aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/luarocks/repos.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/luarocks/repos.lua b/src/luarocks/repos.lua
index e9dddc7c..b2a7d81a 100644
--- a/src/luarocks/repos.lua
+++ b/src/luarocks/repos.lua
@@ -272,7 +272,7 @@ local function backup_existing(should_backup, target)
272 until not fs.exists(backup) -- Slight race condition here, but shouldn't be a problem. 272 until not fs.exists(backup) -- Slight race condition here, but shouldn't be a problem.
273 273
274 util.warning(target.." is not tracked by this installation of LuaRocks. Moving it to "..backup) 274 util.warning(target.." is not tracked by this installation of LuaRocks. Moving it to "..backup)
275 local move_ok, move_err = fs.move(target, backup) 275 local move_ok, move_err = os.rename(target, backup)
276 if not move_ok then 276 if not move_ok then
277 return nil, move_err 277 return nil, move_err
278 end 278 end
@@ -331,7 +331,7 @@ end
331local function rollback_install(op) 331local function rollback_install(op)
332 fs.delete(op.dst) 332 fs.delete(op.dst)
333 if op.backup_file then 333 if op.backup_file then
334 fs.move(op.backup_file, op.dst) 334 os.rename(op.backup_file, op.dst)
335 end 335 end
336 fs.remove_dir_tree_if_empty(dir.dir_name(op.dst)) 336 fs.remove_dir_tree_if_empty(dir.dir_name(op.dst))
337 return true 337 return true
@@ -347,7 +347,7 @@ local function op_rename(op)
347 if fs.exists(op.src) then 347 if fs.exists(op.src) then
348 fs.make_dir(dir.dir_name(op.dst)) 348 fs.make_dir(dir.dir_name(op.dst))
349 fs.delete(op.dst) 349 fs.delete(op.dst)
350 local ok, err = fs.move(op.src, op.dst) 350 local ok, err = os.rename(op.src, op.dst)
351 fs.remove_dir_tree_if_empty(dir.dir_name(op.src)) 351 fs.remove_dir_tree_if_empty(dir.dir_name(op.src))
352 return ok, err 352 return ok, err
353 else 353 else