diff --git a/projects/updater/install.lua b/projects/updater/install.lua index 36bcc55..4a3ea80 100644 --- a/projects/updater/install.lua +++ b/projects/updater/install.lua @@ -85,9 +85,15 @@ local function finishInstall(files) for key, file in ipairs(files) do if customPath ~= nil then print("moving " .. file .. " to " .. customPath .. "...") + if fs.exists(customPath .. "/" .. file) then + fs.delete(customPath .. "/" .. file) + end fs.move(temp .. file, customPath .. "/" .. file) else print("moving " .. file .. " to " .. path .. programToInstall .. "...") + if fs.exists(path .. programToInstall .. "/" .. file) then + fs.delete(path .. programToInstall .. "/" .. file) + end fs.move(temp .. file, path .. programToInstall .. "/" .. file) end end diff --git a/projects/updater/update.lua b/projects/updater/update.lua index 226d8cb..b8b9ec9 100644 --- a/projects/updater/update.lua +++ b/projects/updater/update.lua @@ -102,9 +102,15 @@ local function finishInstall(files) for key, file in ipairs(files) do if customPath ~= nil then print("moving " .. file .. " to " .. customPath .. "...") + if fs.exists(customPath .. "/" .. file) then + fs.delete(customPath .. "/" .. file) + end fs.move(temp .. file, customPath .. "/" .. file) else print("moving " .. file .. " to " .. path .. programToInstall .. "...") + if fs.exists(path .. programToInstall .. "/" .. file) then + fs.delete(path .. programToInstall .. "/" .. file) + end fs.move(temp .. file, path .. programToInstall .. "/" .. file) end end