|spring: develop 6e2a739d|
|gajop||gajop||develop||2018-11-10 18:26:06||develop ddc3c1a4|
|Affected Issues||0005537: Changing modinfo.lua dependencies doesn't reset cache|
ArchiveScanner will now properly detect when modinfo.lua/mapinfo.lua
changes, and reparse the archive.
This fixes issues like changing the depends subtable and not seeing any
change until the cache dir is deleted.
- We now cache an additional path to the modinfo.lua/mapinfo.lua and
the related modified timestamp. This applies to datadirs (.sdd)
- This means that reading the cache will have two additional stat calls
for datadirs. I have over 40 .sdd archives (on both HDD and SSD) and
there is no noticeable performance hit. Players are likely to have very
few of such archives, probably 0. So unlikely to hurt performance in
- Likewise, this information is only saved for datadirs as well, so
there shouldn't be any performance hit on writing the cache either.
- The way I obtain the full path of the archive is stolen from
`CVFSHandler::GetFileAbsolutePath`, and maybe could be rewritten with
DRY. Also probably should be tested on windows, the "/" seems suspicious
- INTERNAL_VAR is incremented
- CheckCachedData signature is modified to pass modifiedTime by
reference as it cannot be nullptr
- internalver is loaded as lowercase (consistent to how its saved)
|mod - rts/System/FileSystem/ArchiveScanner.cpp|
|mod - rts/System/FileSystem/ArchiveScanner.h|