aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/luarocks/fs/win32.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/luarocks/fs/win32.lua b/src/luarocks/fs/win32.lua
index f544393d..8ae62cf0 100644
--- a/src/luarocks/fs/win32.lua
+++ b/src/luarocks/fs/win32.lua
@@ -336,7 +336,12 @@ function win32.make_temp_dir(name_pattern)
336end 336end
337 337
338function win32.tmpname() 338function win32.tmpname()
339 return os.getenv("TMP")..os.tmpname() 339 local name = os.tmpname()
340 local tmp = os.getenv("TMP")
341 if tmp and name:sub(1, #tmp) ~= tmp then
342 name = (tmp .. "\\" .. name):gsub("\\+", "\\")
343 end
344 return name
340end 345end
341 346
342function win32.current_user() 347function win32.current_user()