aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThijs Schreijer <thijs@thijsschreijer.nl>2013-12-01 00:08:55 -0800
committerThijs Schreijer <thijs@thijsschreijer.nl>2013-12-01 00:08:55 -0800
commit62c74024f52d6aa256dfbe3c978496d1a22a444f (patch)
tree212b7968ecd871c7378fea009af7e66a1e3a83c5 /src
parent3cd6318db05dce7c18c191061cbb29c0d9aed5cd (diff)
parent5d8a42b6667248e6c0fea881ffb9863d1374a68a (diff)
downloadluarocks-62c74024f52d6aa256dfbe3c978496d1a22a444f.tar.gz
luarocks-62c74024f52d6aa256dfbe3c978496d1a22a444f.tar.bz2
luarocks-62c74024f52d6aa256dfbe3c978496d1a22a444f.zip
Merge pull request #191 from Tieske/refactor_priv
simplified priviledge test on Windows
Diffstat (limited to 'src')
-rw-r--r--src/luarocks/fs/win32.lua7
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