Repository navigation
bugfix(filesystem): Fix existing files being reported as missing after they are created again - #3473
tintinhamans wants to merge 1 commit into
Conversation
…r they are created again
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
WalkthroughThe file-existence cache’s maximum-value check now casts the complemented ChangesFile-existence cache
Priority: ➖ Normal Estimated code review effort: 1 (Trivial) | ~5 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The cache now preserves the missing-file sentinel when an existing file is recreated, avoiding the reported false-missing result. No actionable merge-blocking risk remains. Pre-merge checks |
|
|
xezon
left a comment
There was a problem hiding this comment.
I will put a block on this because I also have a big pending filesystem change coming up which also touches many things here.
Creating a file that the existence cache already knows about marks it as missing.
doesFileExistthen says no for it until the game is closed, even though the file is on disk.FileInstanceis anUnsignedByte, so~FileInstance(0)is theint-1. The unsetinstanceDoesNotExistof 255 never equals that, so it gets incremented anyway and wraps to 0.I ran into this while reloading game data in one process. The map preview gets copied to
MapPreviewsa second time and then draws as the missing texture.On main the map transfer can run into it.
ConnectionManager::processFileasks if the file exists and then creates it, so receiving a file you already have marks it as missing.GameLogic::loadMapINIthen skips that map'smap.ini,solo.iniandmap.str.