diff options
Diffstat (limited to 'install.bat')
-rw-r--r-- | install.bat | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/install.bat b/install.bat index a98b32fd..43b18e1d 100644 --- a/install.bat +++ b/install.bat | |||
@@ -67,8 +67,17 @@ local function exec(cmd) | |||
67 | end | 67 | end |
68 | 68 | ||
69 | local function exists(filename) | 69 | local function exists(filename) |
70 | local cmd = [[.\win32\tools\test -e "]]..filename..[["]] | 70 | local fd, _, code = io.open(filename, "r") |
71 | return exec(cmd) | 71 | if code == 13 then |
72 | -- code 13 means "Permission denied" on both Unix and Windows | ||
73 | -- io.open on folders always fails with code 13 on Windows | ||
74 | return true | ||
75 | end | ||
76 | if fd then | ||
77 | fd:close() | ||
78 | return true | ||
79 | end | ||
80 | return false | ||
72 | end | 81 | end |
73 | 82 | ||
74 | local function mkdir (dir) | 83 | local function mkdir (dir) |