From 060d1f453db18333ee0df0320dae0df360943a7b Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Sat, 3 Mar 2012 04:55:00 +0000 Subject: [PATCH] - change the crc cache file names to avoid excessively long filenames and to see if this improves performance and fixes buggy behaviour. --- .../sources/platform/common/platform_common.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/source/shared_lib/sources/platform/common/platform_common.cpp b/source/shared_lib/sources/platform/common/platform_common.cpp index 8b75277b6..d71ae35cc 100644 --- a/source/shared_lib/sources/platform/common/platform_common.cpp +++ b/source/shared_lib/sources/platform/common/platform_common.cpp @@ -576,11 +576,17 @@ void setCRCCacheFilePath(string path) { string getFormattedCRCCacheFileName(std::pair cacheKeys) { string crcCacheFile = cacheKeys.first + cacheKeys.second; - replaceAll(crcCacheFile, "/", "_"); - replaceAll(crcCacheFile, "\\", "_"); - replaceAll(crcCacheFile, "*", "_"); - replaceAll(crcCacheFile, ".", "_"); - return getCRCCacheFilePath() + crcCacheFile; + //replaceAll(crcCacheFile, "/", "_"); + //replaceAll(crcCacheFile, "\\", "_"); + //replaceAll(crcCacheFile, "*", "_"); + //replaceAll(crcCacheFile, ".", "_"); + //return getCRCCacheFilePath() + crcCacheFile; + + Checksum checksum; + checksum.addString(crcCacheFile); + string result = getCRCCacheFilePath() + "CRC_CACHE_" + intToStr(checksum.getSum()); + //printf("result [%s]\n",result.c_str()); + return result; } std::pair getFolderTreeContentsCheckSumCacheKey(vector paths, string pathSearchString, const string filterFileExt) { string cacheLookupId = CacheManager::getFolderTreeContentsCheckSumRecursivelyCacheLookupKey1;