- force crc refresh right after clearing the cache after file xfer
This commit is contained in:
parent
330caf7f8a
commit
fe2854e3e0
|
@ -1966,37 +1966,15 @@ void MenuStateConnectedGame::FTPClient_CallbackEvent(string itemName, FTP_Client
|
||||||
Checksum::clearFileCache();
|
Checksum::clearFileCache();
|
||||||
|
|
||||||
vector<string> paths = Config::getInstance().getPathListForType(ptTilesets);
|
vector<string> paths = Config::getInstance().getPathListForType(ptTilesets);
|
||||||
//string cacheLookupId = CacheManager::getFolderTreeContentsCheckSumRecursivelyCacheLookupKey1;
|
|
||||||
//std::map<string,int32> &crcTreeCache = CacheManager::getCachedItem< std::map<string,int32> >(cacheLookupId);
|
|
||||||
string pathSearchString = string("/") + itemName + string("/*");
|
string pathSearchString = string("/") + itemName + string("/*");
|
||||||
const string filterFileExt = ".xml";
|
const string filterFileExt = ".xml";
|
||||||
clearFolderTreeContentsCheckSum(paths, pathSearchString, filterFileExt);
|
clearFolderTreeContentsCheckSum(paths, pathSearchString, filterFileExt);
|
||||||
clearFolderTreeContentsCheckSumList(paths, pathSearchString, filterFileExt);
|
clearFolderTreeContentsCheckSumList(paths, pathSearchString, filterFileExt);
|
||||||
|
|
||||||
// string cacheKey = "";
|
// Refresh CRC
|
||||||
// size_t count = paths.size();
|
Config &config = Config::getInstance();
|
||||||
// for(size_t idx = 0; idx < count; ++idx) {
|
int32 tilesetCRC = getFolderTreeContentsCheckSumRecursively(config.getPathListForType(ptTilesets,""), string("/") + gameSettings->getTileset() + string("/*"), ".xml", NULL);
|
||||||
// string path = paths[idx] + pathSearchString;
|
|
||||||
//
|
|
||||||
// cacheKey += path + "_" + filterFileExt + "_";
|
|
||||||
// }
|
|
||||||
// if(crcTreeCache.find(cacheKey) != crcTreeCache.end()) {
|
|
||||||
// SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] CLEARING CACHED checksum for cacheKey [%s]\n",__FILE__,__FUNCTION__,__LINE__,cacheKey.c_str());
|
|
||||||
// crcTreeCache.erase(cacheKey);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// string cacheLookupId = CacheManager::getFolderTreeContentsCheckSumRecursivelyCacheLookupKey2;
|
|
||||||
// std::map<string,int32> &crcTreeCache2 = CacheManager::getCachedItem< std::map<string,int32> >(cacheLookupId);
|
|
||||||
//
|
|
||||||
// for(size_t idx = 0; idx < paths.size(); ++idx) {
|
|
||||||
// string path = paths[idx] + pathSearchString;
|
|
||||||
//
|
|
||||||
// string cacheKey = path + "_" + filterFileExt;
|
|
||||||
// if(crcTreeCache2.find(cacheKey) != crcTreeCache2.end()) {
|
|
||||||
// SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] CLEARING CACHED checksum for cacheKey [%s]\n",__FILE__,__FUNCTION__,__LINE__,cacheKey.c_str());
|
|
||||||
// crcTreeCache2.erase(cacheKey);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
safeMutexFTPProgress.ReleaseLock();
|
safeMutexFTPProgress.ReleaseLock();
|
||||||
// END
|
// END
|
||||||
|
|
||||||
|
@ -2046,37 +2024,15 @@ void MenuStateConnectedGame::FTPClient_CallbackEvent(string itemName, FTP_Client
|
||||||
Checksum::clearFileCache();
|
Checksum::clearFileCache();
|
||||||
|
|
||||||
vector<string> paths = Config::getInstance().getPathListForType(ptTechs);
|
vector<string> paths = Config::getInstance().getPathListForType(ptTechs);
|
||||||
//string cacheLookupId = CacheManager::getFolderTreeContentsCheckSumRecursivelyCacheLookupKey1;
|
|
||||||
//std::map<string,int32> &crcTreeCache = CacheManager::getCachedItem< std::map<string,int32> >(cacheLookupId);
|
|
||||||
string pathSearchString = string("/") + itemName + string("/*");
|
string pathSearchString = string("/") + itemName + string("/*");
|
||||||
const string filterFileExt = ".xml";
|
const string filterFileExt = ".xml";
|
||||||
clearFolderTreeContentsCheckSum(paths, pathSearchString, filterFileExt);
|
clearFolderTreeContentsCheckSum(paths, pathSearchString, filterFileExt);
|
||||||
clearFolderTreeContentsCheckSumList(paths, pathSearchString, filterFileExt);
|
clearFolderTreeContentsCheckSumList(paths, pathSearchString, filterFileExt);
|
||||||
|
|
||||||
// string cacheKey = "";
|
// Refresh CRC
|
||||||
// size_t count = paths.size();
|
Config &config = Config::getInstance();
|
||||||
// for(size_t idx = 0; idx < count; ++idx) {
|
int32 techCRC = getFolderTreeContentsCheckSumRecursively(config.getPathListForType(ptTechs,""), string("/") + gameSettings->getTech() + string("/*"), ".xml", NULL);
|
||||||
// string path = paths[idx] + pathSearchString;
|
|
||||||
//
|
|
||||||
// cacheKey += path + "_" + filterFileExt + "_";
|
|
||||||
// }
|
|
||||||
// if(crcTreeCache.find(cacheKey) != crcTreeCache.end()) {
|
|
||||||
// SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] CLEARING CACHED checksum for cacheKey [%s]\n",__FILE__,__FUNCTION__,__LINE__,cacheKey.c_str());
|
|
||||||
// crcTreeCache.erase(cacheKey);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// string cacheLookupId = CacheManager::getFolderTreeContentsCheckSumRecursivelyCacheLookupKey2;
|
|
||||||
// std::map<string,int32> &crcTreeCache2 = CacheManager::getCachedItem< std::map<string,int32> >(cacheLookupId);
|
|
||||||
//
|
|
||||||
// for(size_t idx = 0; idx < paths.size(); ++idx) {
|
|
||||||
// string path = paths[idx] + pathSearchString;
|
|
||||||
//
|
|
||||||
// string cacheKey = path + "_" + filterFileExt;
|
|
||||||
// if(crcTreeCache2.find(cacheKey) != crcTreeCache2.end()) {
|
|
||||||
// SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] CLEARING CACHED checksum for cacheKey [%s]\n",__FILE__,__FUNCTION__,__LINE__,cacheKey.c_str());
|
|
||||||
// crcTreeCache2.erase(cacheKey);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
safeMutexFTPProgress.ReleaseLock();
|
safeMutexFTPProgress.ReleaseLock();
|
||||||
// END
|
// END
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user