diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/luarocks/fs/win32.lua | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/luarocks/fs/win32.lua b/src/luarocks/fs/win32.lua index b6ea25e4..a3f0663b 100644 --- a/src/luarocks/fs/win32.lua +++ b/src/luarocks/fs/win32.lua | |||
@@ -201,11 +201,8 @@ function is_writable(file) | |||
201 | if result then | 201 | if result then |
202 | -- the above test might give a false positive when writing to | 202 | -- the above test might give a false positive when writing to |
203 | -- c:\program files\ because of VirtualStore redirection on Vista and up | 203 | -- c:\program files\ because of VirtualStore redirection on Vista and up |
204 | -- So get a directory listing and check whether it's really there | 204 | -- So check whether it's really there |
205 | local pipe = io.popen("dir "..fs.Q(file)) | 205 | result = fs.exists(file2) |
206 | local dir_list = pipe:read("*a") | ||
207 | pipe:close() | ||
208 | result = (nil ~= string.find(dir_list, tmpname, 1, true)) | ||
209 | end | 206 | end |
210 | os.remove(file2) | 207 | os.remove(file2) |
211 | else | 208 | else |