fix(gate): use unique cache busting file names again to break any potential loop

This commit is contained in:
2026-07-11 16:36:50 +08:00
parent ef6af4bc62
commit ca9805f13a
3 changed files with 9 additions and 5 deletions
+4 -2
View File
@@ -1,7 +1,7 @@
local DEFAULT_SERVER_BASE = "http://ticket.fse-media.group"
local DEFAULT_SERVER_PATH = "/api/tickets/check"
local GATE_OPEN_SECONDS = 2
local VERSION = "v1.5.21"
local VERSION = "v1.5.22"
local VERSION_CHECK_INTERVAL = 5
local serverURL = nil
@@ -1465,7 +1465,7 @@ local function checkAndApplyUpdate()
if not remoteTs or remoteTs <= 0 then return end
local attemptFile = ".last_update_ts_gate"
local attemptFile = ".last_update_ts_gate2"
if fs.exists(attemptFile) then
local f = fs.open(attemptFile, "r")
local tried = tonumber(f and f.readAll() or "0") or 0
@@ -1495,6 +1495,7 @@ local function checkAndApplyUpdate()
print("OTA Update Error: " .. tostring(res))
term.setTextColor(colors.white)
end
sleep(3)
end
else
lastUpdateError = "loadfile failed: " .. tostring(err)
@@ -1503,6 +1504,7 @@ local function checkAndApplyUpdate()
print("OTA Update Error: " .. tostring(err))
term.setTextColor(colors.white)
end
sleep(3)
end
isUpdating = false