Skip to content

Commit 914a21f

Browse files
authored
Merge pull request #80707 from RenechCDDA/stale_fixes
Fix game warning over 'stale data' on achievements json
2 parents d64db9c + 4cd76be commit 914a21f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/flexbuffer_cache.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,8 +327,10 @@ class flexbuffer_disk_cache
327327
// Does the source file's mtime match what we cached previously
328328
if( source_mtime != disk_entry->second.mtime ) {
329329
std::string filepath_and_name = disk_entry->first;
330-
// we use this as an exclusion condition. Configuration options can be changed all the time, we don't want to warn over those.
331-
bool stale_game_data = *root_relative_source_path.begin() != std::filesystem::u8path( "config" );
330+
// we use this as an exclusion condition. Configuration options can be changed all the time, we don't want to warn over those. Same for achievements.
331+
bool stale_game_data = *root_relative_source_path.begin() != std::filesystem::u8path( "config" ) &&
332+
*root_relative_source_path.begin() != std::filesystem::u8path( "achievements" ) &&
333+
*root_relative_source_path.begin() != std::filesystem::u8path( "templates" );
332334
if( stale_game_data ) {
333335
if( get_option<bool>( "WARN_ON_MODIFIED" ) ) {
334336
debugmsg( "Stale game data detected at %s, did you overwrite old files? When updating the game you must install to a fresh folder, overwriting old files will cause errors.",

0 commit comments

Comments
 (0)