diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/luarocks/fs/win32.lua | 7 |
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) | |||
336 | end | 336 | end |
337 | 337 | ||
338 | function win32.tmpname() | 338 | function 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 | ||
340 | end | 345 | end |
341 | 346 | ||
342 | function win32.current_user() | 347 | function win32.current_user() |