diff options
| author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2026-05-22 12:35:34 +0300 |
|---|---|---|
| committer | Andrey Lihatskiy <118752495+marchcat@users.noreply.github.com> | 2026-05-22 13:20:41 +0300 |
| commit | 79706342b25e165c4c6bddf45f60b4d541accc49 (patch) | |
| tree | 394d166ac97ea6632a2a2f20ab0b25ef985fa0cd /indra | |
| parent | b98a97a4b47836bd426141e0af570738041c33de (diff) | |
Revert LLFileSystem changes to preserve Linux branch approach
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/llfilesystem/llfilesystem.cpp | 23 | ||||
| -rw-r--r-- | indra/llfilesystem/llfilesystem.h | 1 |
2 files changed, 3 insertions, 21 deletions
diff --git a/indra/llfilesystem/llfilesystem.cpp b/indra/llfilesystem/llfilesystem.cpp index dcebec494f..388cbc280f 100644 --- a/indra/llfilesystem/llfilesystem.cpp +++ b/indra/llfilesystem/llfilesystem.cpp @@ -33,7 +33,6 @@ #include "llfilesystem.h" #include "llfasttimer.h" #include "lldiskcache.h" -#include "boost/filesystem.hpp" constexpr S32 LLFileSystem::READ = 0x00000001; constexpr S32 LLFileSystem::WRITE = 0x00000002; @@ -75,12 +74,9 @@ bool LLFileSystem::getExists(const LLUUID& file_id, const LLAssetType::EType fil LL_PROFILE_ZONE_SCOPED; const std::string filename = LLDiskCache::metaDataToFilepath(file_id, file_type); - boost::system::error_code ec; - if (boost::filesystem::exists(filename, ec) && boost::filesystem::is_regular_file(filename, ec)) - { - return boost::filesystem::file_size(filename, ec) > 0; - } - return false; + // not only test for existence but for the file to be not empty + S64 size = LLFile::size(filename); + return size > 0; } // static @@ -112,19 +108,6 @@ bool LLFileSystem::renameFile(const LLUUID& old_file_id, const LLAssetType::ETyp return true; } -// static -S32 LLFileSystem::getFileSize(const LLUUID& file_id, const LLAssetType::EType file_type) -{ - const std::string filename = LLDiskCache::metaDataToFilepath(file_id, file_type); - - boost::system::error_code ec; - if (boost::filesystem::exists(filename, ec) && boost::filesystem::is_regular_file(filename, ec)) - { - return static_cast<S32>(boost::filesystem::file_size(filename, ec)); - } - return 0; -} - bool LLFileSystem::read(U8* buffer, S32 bytes) { bool success = false; diff --git a/indra/llfilesystem/llfilesystem.h b/indra/llfilesystem/llfilesystem.h index d212a5d709..bc8b9216bd 100644 --- a/indra/llfilesystem/llfilesystem.h +++ b/indra/llfilesystem/llfilesystem.h @@ -62,7 +62,6 @@ class LLFileSystem void updateFileAccessTime(); static bool getExists(const LLUUID& file_id, const LLAssetType::EType file_type); - static S32 getFileSize(const LLUUID& file_id, const LLAssetType::EType file_type); static bool removeFile(const LLUUID& file_id, const LLAssetType::EType file_type, int suppress_warning = 0); static bool renameFile(const LLUUID& old_file_id, const LLAssetType::EType old_file_type, const LLUUID& new_file_id, const LLAssetType::EType new_file_type); |
