diff options
| author | Erik Kundiman <erik@megapahit.org> | 2026-09-30 23:18:12 +0800 |
|---|---|---|
| committer | Erik Kundiman <erik@megapahit.org> | 2026-09-30 23:18:12 +0800 |
| commit | aab921de20b6bc62568c270a01ffc297be5dc1fc (patch) | |
| tree | 2ccd7b94b0f7e2e79fc9898242d44d34bdf16f0e /indra/llfilesystem | |
| parent | 8c401efcbfa09eefb7c0cab20afb68eb5722d858 (diff) | |
| parent | d2ad1c4092648af8e50c6591a287c703afed2506 (diff) | |
Merge tag 'Second_Life_Release#d2ad1c40-26.4' into 26.4
Diffstat (limited to 'indra/llfilesystem')
| -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) |
