diff options
| author | Rider Linden <rider@lindenlab.com> | 2026-10-02 09:29:55 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-10-02 09:29:55 -0700 |
| commit | 48e1f6f25b952eeb35e891cd73265e652198cae6 (patch) | |
| tree | 334d05075af85eebca7477078e6ec95e78a510c3 /indra/llfilesystem/lldiskcache.cpp | |
| parent | 8c98605cae0ed5e4d0d70e806703ef13f277e245 (diff) | |
| parent | 01786bf78c825cce2639c482bfc97ae5f3161a1b (diff) | |
Merge branch 'release/26.4' into rider/issue-710
Diffstat (limited to 'indra/llfilesystem/lldiskcache.cpp')
| -rw-r--r-- | indra/llfilesystem/lldiskcache.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/indra/llfilesystem/lldiskcache.cpp b/indra/llfilesystem/lldiskcache.cpp index e7b43e15e2..5af801a1df 100644 --- a/indra/llfilesystem/lldiskcache.cpp +++ b/indra/llfilesystem/lldiskcache.cpp @@ -34,6 +34,7 @@ #include "llapp.h" #include "llassettype.h" #include "lldir.h" +#include "llstring.h" #include <chrono> #include <filesystem> @@ -116,14 +117,14 @@ void LLDiskCache::purge() } if (std::filesystem::is_regular_file(*iter, ec) && !ec) { - if ((*iter).path().string().find(CACHE_FILENAME_PREFIX) != std::string::npos) + if (fsyspath((*iter).path()).string().find(CACHE_FILENAME_PREFIX) != std::string::npos) { uintmax_t file_size = std::filesystem::file_size(*iter, ec); if (ec) { continue; } - const std::string file_path = (*iter).path().string(); + const std::string file_path = fsyspath((*iter).path()).string(); const std::filesystem::file_time_type file_time = std::filesystem::last_write_time(*iter, ec); if (ec) { @@ -165,7 +166,7 @@ void LLDiskCache::purge() } if (should_remove) { - std::filesystem::remove(entry.second.second, ec); + std::filesystem::remove(fsyspath(entry.second.second), ec); if (ec) { LL_WARNS() << "Failed to delete cache file " << entry.second.second << ": " << ec.message() << LL_ENDL; @@ -245,7 +246,7 @@ void LLDiskCache::clearCache() { if (std::filesystem::is_regular_file(*iter, ec) && !ec) { - if ((*iter).path().string().find(CACHE_FILENAME_PREFIX) != std::string::npos) + if (fsyspath((*iter).path()).string().find(CACHE_FILENAME_PREFIX) != std::string::npos) { std::filesystem::remove(*iter, ec); if (ec) @@ -274,8 +275,9 @@ void LLDiskCache::removeOldVFSFiles() { if (std::filesystem::is_regular_file(*iter, ec) && !ec) { - if (((*iter).path().string().find(CACHE_FORMAT) != std::string::npos) || - ((*iter).path().string().find(DB_FORMAT) != std::string::npos)) + const std::string file_path = fsyspath((*iter).path()).string(); + if ((file_path.find(CACHE_FORMAT) != std::string::npos) || + (file_path.find(DB_FORMAT) != std::string::npos)) { std::filesystem::remove(*iter, ec); if (ec) @@ -311,7 +313,7 @@ uintmax_t LLDiskCache::dirFileSize(const std::string& dir) { if (std::filesystem::is_regular_file(*iter, ec) && !ec) { - if ((*iter).path().string().find(CACHE_FILENAME_PREFIX) != std::string::npos) + if (fsyspath((*iter).path()).string().find(CACHE_FILENAME_PREFIX) != std::string::npos) { uintmax_t file_size = std::filesystem::file_size(*iter, ec); if (!ec) |
