diff options
-rw-r--r-- | src/luarocks/fs/unix/tools.lua | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/luarocks/fs/unix/tools.lua b/src/luarocks/fs/unix/tools.lua index 7106ed81..42e22060 100644 --- a/src/luarocks/fs/unix/tools.lua +++ b/src/luarocks/fs/unix/tools.lua | |||
@@ -318,10 +318,7 @@ end | |||
318 | function tools.lock_access(dirname, force) | 318 | function tools.lock_access(dirname, force) |
319 | fs.make_dir(dirname) | 319 | fs.make_dir(dirname) |
320 | 320 | ||
321 | local tempfile = os.tmpname() | 321 | local tempfile = dir.path(dirname, ".lock.tmp." .. tostring(math.random(100000000))) |
322 | if not tempfile then | ||
323 | return nil, "failed creating temp file for locking" | ||
324 | end | ||
325 | 322 | ||
326 | local fd, fderr = io.open(tempfile, "w") | 323 | local fd, fderr = io.open(tempfile, "w") |
327 | if not fd then | 324 | if not fd then |