This commit is contained in:
xomf 2024-08-17 23:01:49 -04:00
parent b65a746152
commit 2e33e98e5e

View File

@ -24,7 +24,7 @@ rawset(__BUNDLER_FILES, "updater.lua", function ()
local update_code_text = update_code_request.readAll() local update_code_text = update_code_request.readAll()
if update_code_text then if update_code_text then
if string.find(update_code_text, "^local __BUNDLER_FILES = {}") then if string.find(update_code_text, "^local __BUNDLER_FILES = {}") then
--make backup -- Make backup
fs.copy("startup.lua", "backup.lua") fs.copy("startup.lua", "backup.lua")
local startup_file = fs.open("startup.lua", "r") local startup_file = fs.open("startup.lua", "r")
local startup_contents = startup_file.readAll() local startup_contents = startup_file.readAll()
@ -39,14 +39,17 @@ rawset(__BUNDLER_FILES, "updater.lua", function ()
LAST_USED = os.time() LAST_USED = os.time()
return return
end end
end else
print("Bad file download (core)") print("Bad file download (core)")
end end
else
print("Bad mem read (core)") print("Bad mem read (core)")
end end
else
print("Bad download (core)") print("Bad download (core)")
end end
end end
end
function mod.UpdateChecker() function mod.UpdateChecker()
while true do while true do
checkForUpdate() checkForUpdate()