summaryrefslogtreecommitdiff
path: root/indra/llfilesystem/lldiskcache.cpp
diff options
context:
space:
mode:
authorCallum Prentice <callum@lindenlab.com>2021-05-11 12:59:37 -0700
committerCallum Prentice <callum@lindenlab.com>2021-05-11 12:59:37 -0700
commitc241c5d4b8007793cb4b5f5e54fa3883aad3dad5 (patch)
tree4d98a8cc23c499d00f91d4d989bf3596c0bdf2bf /indra/llfilesystem/lldiskcache.cpp
parent3898609ae24e7787d6f6ae71c2424b43102326bf (diff)
parent1ec6c10c140131dc3e71eb4b90a6fbcf2f4ec61e (diff)
Merge branch 'DRTVWR-519' of https://bitbucket.org/lindenlab/viewer into DRTVWR-519
Diffstat (limited to 'indra/llfilesystem/lldiskcache.cpp')
-rw-r--r--indra/llfilesystem/lldiskcache.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/indra/llfilesystem/lldiskcache.cpp b/indra/llfilesystem/lldiskcache.cpp
index 241c46dc73..02678864b9 100644
--- a/indra/llfilesystem/lldiskcache.cpp
+++ b/indra/llfilesystem/lldiskcache.cpp
@@ -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;
+ }
}
}
}