This commit is contained in:
2024-08-25 22:10:22 +03:00
parent 009d9d6071
commit bb8aceb832
2 changed files with 6 additions and 2 deletions

View File

@@ -91,7 +91,9 @@ function updater:update(path, url)
if fs.exists(path .. ".bak") then
fs.delete(path .. ".bak");
end
fs.copy(path, path..".bak");
if fs.exists(path) then
fs.copy(path, path..".bak");
end
local fd = fs.open(path, "w");
fd.write(body);