fix(spoof): guard atomicWrite errors in updateTo
writeText and Files.move can throw IOException, SecurityException, or AtomicMoveNotSupportedException. The exception previously propagated through updateTo into BulletinPoller.fetchAndParse's broad catch, which mislabelled it as "network_error" in the history. Wrap atomicWrite, log the real failure, and return before resetprop so the on-disk file and live props stay consistent on failure.
This commit is contained in:
@@ -82,7 +82,12 @@ object PatchLevelManager {
|
||||
)
|
||||
return
|
||||
}
|
||||
atomicWrite(date)
|
||||
try {
|
||||
atomicWrite(date)
|
||||
} catch (e: Exception) {
|
||||
SystemLogger.error("PatchLevelManager: atomicWrite failed for $date", e)
|
||||
return
|
||||
}
|
||||
applyToProps(date)
|
||||
SystemLogger.info("PatchLevelManager: applied patch date $date")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user