- bugfix for mode menu CRC checking

This commit is contained in:
Mark Vejvoda 2011-09-02 06:05:37 +00:00
parent ba35e3cc9f
commit 1e2e7a5ef7

View File

@ -1283,8 +1283,8 @@ void MenuStateMods::mouseClick(int x, int y, MouseButton mouseButton) {
string itemPath = config.getPathListForType(ptTechs,"")[1] + "/" + selectedTechName + string("/*"); string itemPath = config.getPathListForType(ptTechs,"")[1] + "/" + selectedTechName + string("/*");
bool forceRefresh = (mapCRCUpdateList.find(itemPath) == mapCRCUpdateList.end()); bool forceRefresh = (mapCRCUpdateList.find(itemPath) == mapCRCUpdateList.end());
if( strToInt(modInfo.crc) != 0 && if( strToInt(modInfo.crc) != 0 &&
strToInt(modInfo.crc) != getFolderTreeContentsCheckSumRecursively(itemPath, "", NULL,forceRefresh)) { strToInt(modInfo.crc) != getFolderTreeContentsCheckSumRecursively(itemPath, ".xml", NULL,forceRefresh)) {
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line %d] local CRC [%d]\n",__FILE__,__FUNCTION__,__LINE__,getFolderTreeContentsCheckSumRecursively(itemPath, "", NULL)); if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line %d] local CRC [%d]\n",__FILE__,__FUNCTION__,__LINE__,getFolderTreeContentsCheckSumRecursively(itemPath, ".xml", NULL));
mainMessageBoxState = ftpmsg_ReplaceTechtree; mainMessageBoxState = ftpmsg_ReplaceTechtree;
mainMessageBox.init(lang.get("Yes"),lang.get("No")); mainMessageBox.init(lang.get("Yes"),lang.get("No"));
@ -1361,8 +1361,8 @@ void MenuStateMods::mouseClick(int x, int y, MouseButton mouseButton) {
bool forceRefresh = (mapCRCUpdateList.find(itemPath) == mapCRCUpdateList.end()); bool forceRefresh = (mapCRCUpdateList.find(itemPath) == mapCRCUpdateList.end());
if( strToInt(modInfo.crc) != 0 && if( strToInt(modInfo.crc) != 0 &&
strToInt(modInfo.crc) != getFolderTreeContentsCheckSumRecursively(itemPath, "", NULL,forceRefresh)) { strToInt(modInfo.crc) != getFolderTreeContentsCheckSumRecursively(itemPath, ".xml", NULL,forceRefresh)) {
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line %d] local CRC [%d]\n",__FILE__,__FUNCTION__,__LINE__,getFolderTreeContentsCheckSumRecursively(itemPath, "", NULL)); if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line %d] local CRC [%d]\n",__FILE__,__FUNCTION__,__LINE__,getFolderTreeContentsCheckSumRecursively(itemPath, ".xml", NULL));
mainMessageBoxState = ftpmsg_ReplaceTileset; mainMessageBoxState = ftpmsg_ReplaceTileset;
mainMessageBox.init(lang.get("Yes"),lang.get("No")); mainMessageBox.init(lang.get("Yes"),lang.get("No"));
@ -2247,7 +2247,7 @@ void MenuStateMods::FTPClient_CallbackEvent(string itemName,
// Refresh CRC // Refresh CRC
Config &config = Config::getInstance(); Config &config = Config::getInstance();
uint32 CRCTilesetValue = getFolderTreeContentsCheckSumRecursively(config.getPathListForType(ptTilesets,""), string("/") + itemName + string("/*"), ".xml", NULL); int32 CRCTilesetValue = getFolderTreeContentsCheckSumRecursively(config.getPathListForType(ptTilesets,""), string("/") + itemName + string("/*"), ".xml", NULL);
safeMutexFTPProgress.ReleaseLock(); safeMutexFTPProgress.ReleaseLock();
// END // END
@ -2292,7 +2292,7 @@ void MenuStateMods::FTPClient_CallbackEvent(string itemName,
// Refresh CRC // Refresh CRC
Config &config = Config::getInstance(); Config &config = Config::getInstance();
uint32 CRCTechtreeValue = getFolderTreeContentsCheckSumRecursively(config.getPathListForType(ptTechs,""), string("/") + itemName + string("/*"), ".xml", NULL); int32 CRCTechtreeValue = getFolderTreeContentsCheckSumRecursively(config.getPathListForType(ptTechs,""), string("/") + itemName + string("/*"), ".xml", NULL, true);
safeMutexFTPProgress.ReleaseLock(); safeMutexFTPProgress.ReleaseLock();
// END // END
@ -2339,7 +2339,7 @@ void MenuStateMods::FTPClient_CallbackEvent(string itemName,
// Refresh CRC // Refresh CRC
Config &config = Config::getInstance(); Config &config = Config::getInstance();
uint32 CRCTilesetValue = getFolderTreeContentsCheckSumRecursively(config.getPathListForType(ptScenarios,""), string("/") + itemName + string("/*"), ".xml", NULL); int32 CRCTilesetValue = getFolderTreeContentsCheckSumRecursively(config.getPathListForType(ptScenarios,""), string("/") + itemName + string("/*"), ".xml", NULL, true);
safeMutexFTPProgress.ReleaseLock(); safeMutexFTPProgress.ReleaseLock();
// END // END