meow-7.2.2
Ansariel 2021-05-18 09:02:44 +02:00
commit ef501d40af
3 changed files with 0 additions and 12 deletions

View File

@ -43,8 +43,6 @@
static const char* subdirs = "0123456789abcdef";
LLDiskCache::LLDiskCache(const std::string cache_dir,
// <FS:Ansariel> Fix integer overflow
//const int max_size_bytes,
const uintmax_t max_size_bytes,
const bool enable_cache_debug_info) :
mCacheDir(cache_dir),
@ -117,15 +115,12 @@ void LLDiskCache::purge()
if (file_size_total > mMaxSizeBytes)
{
action = "DELETE:";
// <FS:Ansariel> Do not crash if we cannot delete the file for some reason
//boost::filesystem::remove(entry.second.second);
boost::system::error_code ec;
boost::filesystem::remove(entry.second.second, ec);
if (ec.failed())
{
LL_WARNS() << "Failed to delete cache file " << entry.second.second << ": " << ec.message() << LL_ENDL;
}
// </FS:Ansariel>
}
else
{
@ -320,15 +315,12 @@ void LLDiskCache::clearCache()
{
if (entry.path().string().find(mCacheFilenamePrefix) != std::string::npos)
{
// <FS:Ansariel> Do not crash if we cannot delete the file for some reason
//boost::filesystem::remove(entry);
boost::system::error_code ec;
boost::filesystem::remove(entry, ec);
if (ec.failed())
{
LL_WARNS() << "Failed to delete cache file " << entry << ": " << ec.message() << LL_ENDL;
}
// </FS:Ansariel>
}
}
}

View File

@ -86,8 +86,6 @@ class LLDiskCache :
* The maximum size of the cache in bytes - Based on the
* setting at 'CacheSize' and 'DiskCachePercentOfTotal'
*/
// <FS:Ansariel> Fix integer overflow
//const int max_size_bytes,
const uintmax_t max_size_bytes,
/**
* A flag that enables extra cache debugging so that

View File

@ -4979,8 +4979,6 @@ bool LLAppViewer::initCache()
//const unsigned int disk_cache_mb = cache_total_size_mb * disk_cache_percent / 100;
const unsigned int disk_cache_mb = gSavedSettings.getU32("FSDiskCacheSize");
// </FS:Ansariel>
// <FS:Ansariel> Fix integer overflow
//const unsigned int disk_cache_bytes = disk_cache_mb * 1024 * 1024;
const uintmax_t disk_cache_bytes = disk_cache_mb * 1024 * 1024;
const bool enable_cache_debug_info = gSavedSettings.getBOOL("EnableDiskCacheDebugInfo");