2019-03-20 12:39 CET

spring: develop 6e2a739d Diff ] Back to Repository ]
Author Committer Branch Timestamp Parent
gajop gajop develop 2018-11-10 18:26:06 develop ddc3c1a4
Affected Issues 0005537: Changing modinfo.lua dependencies doesn't reset cache
Changeset fix 0005537
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.

Implementation details:
- We now cache an additional path to the modinfo.lua/mapinfo.lua and
 the related modified timestamp. This applies to datadirs (.sdd)
 archives only
- 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 Diff ] File ]
mod - rts/System/FileSystem/ArchiveScanner.h Diff ] File ]