all repos — min @ 15464b360485c9f905f2c6474e976ab8803c3b0a

A small but practical concatenative programming language.

Handling unzip destination dir properly (ref: #177).
h3rald h3rald@h3rald.com
Wed, 29 Dec 2021 13:53:13 +0000
commit

15464b360485c9f905f2c6474e976ab8803c3b0a

parent

9c418b2de86738445b1f5a18acb73a65078718e2

1 files changed, 2 insertions(+), 3 deletions(-)

jump to
M minpkg/lib/min_sys.nimminpkg/lib/min_sys.nim

@@ -177,9 +177,8 @@ def.symbol("unzip") do (i: In):

let vals = i.expect("'sym", "'sym") var dir = vals[0].getString let f = vals[1].getString - if dir.len < 1: - raiseInvalid("No destination directory was specified.") - if dir[0] != '.' and dir.len > 1 and dir[1] != '/': + dir = dir.unix + if not dir.contains("/"): dir = "./" & dir extractAll(f, dir)