Merge branch 'DRTVWR-519' of https://bitbucket.org/lindenlab/viewer into DRTVWR-519

meow-7.2.2
Callum Prentice 2021-05-11 12:59:37 -07:00
commit c241c5d4b8
1 changed files with 12 additions and 2 deletions

View File

@ -102,7 +102,12 @@ void LLDiskCache::purge()
if (file_size_total > mMaxSizeBytes)
{
action = "DELETE:";
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;
}
}
else
{
@ -284,7 +289,12 @@ void LLDiskCache::clearCache()
{
if (entry.path().string().find(mCacheFilenamePrefix) != std::string::npos)
{
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;
}
}
}
}