From 45a1fcdf4ebbb8138810afc079d4ce00fa8bc95f Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Mon, 29 Apr 2013 05:51:41 +0000 Subject: [PATCH] bugfix for purgeunused to not delete language files for techtrees --- source/glest_game/main/main.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/glest_game/main/main.cpp b/source/glest_game/main/main.cpp index efe9b9c8..2f5e76b5 100644 --- a/source/glest_game/main/main.cpp +++ b/source/glest_game/main/main.cpp @@ -1663,7 +1663,8 @@ void runTilesetValidationForPath(string tilesetPath, string tilesetName, replaceAll(foundFile, "//", "/"); replaceAll(foundFile, "\\\\", "\\"); - if(loadedFileList.find(foundFile) == loadedFileList.end()) { + if(loadedFileList.find(foundFile) == loadedFileList.end() && + foundFile.find("lang/") == foundFile.npos) { if(foundUnusedFile == false) { printf("\nLine ref: %d, Warning, unused files were detected - START:\n=====================\n",__LINE__); } @@ -2103,7 +2104,8 @@ void runTechValidationForPath(string techPath, string techName, replaceAll(foundFile, "//", "/"); replaceAll(foundFile, "\\\\", "\\"); - if(loadedFileList.find(foundFile) == loadedFileList.end()) { + if(loadedFileList.find(foundFile) == loadedFileList.end() && + foundFile.find("lang/") == foundFile.npos) { if(foundUnusedFile == false) { printf("\nLine ref: %d, Warning, unused files were detected - START:\n=====================\n",__LINE__); }