summaryrefslogtreecommitdiff
path: root/indra/llfilesystem/llfilesystem.cpp
diff options
context:
space:
mode:
authorFrederick Martian <fredmartian@gmail.com>2025-11-28 13:30:36 +0100
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2025-12-10 20:33:58 +0200
commit13a3cf92ca9e647dfc39e761ce0068aa021ca657 (patch)
tree5737102fc4c357ab6488839162eb8c069d206f50 /indra/llfilesystem/llfilesystem.cpp
parent62e08e13d00d62a996a01fff20ad18c1886f3c8a (diff)
- Improve documentation of LLFile functions and methods
- Improve error handling in LLFile::read(), LLFile::write() and LLFile::copy() - Improve LLFileSystem::getFileSize() to work with the extra possibility of LLFile::size() returning -1 on error - Replace LLAPRFile:readEx() and LLAPRFile::writeEx() with according LLFile functions
Diffstat (limited to 'indra/llfilesystem/llfilesystem.cpp')
-rwxr-xr-xindra/llfilesystem/llfilesystem.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/indra/llfilesystem/llfilesystem.cpp b/indra/llfilesystem/llfilesystem.cpp
index 4238dd64e9..087daf78be 100755
--- a/indra/llfilesystem/llfilesystem.cpp
+++ b/indra/llfilesystem/llfilesystem.cpp
@@ -114,8 +114,8 @@ bool LLFileSystem::renameFile(const LLUUID& old_file_id, const LLAssetType::ETyp
S32 LLFileSystem::getFileSize(const LLUUID& file_id, const LLAssetType::EType file_type)
{
const std::string filename = LLDiskCache::metaDataToFilepath(file_id, file_type);
-
- return (S32)LLFile::size(filename);
+ S64 fileSize = LLFile::size(filename);
+ return (fileSize > 0) ? (S32)fileSize : 0;
}
bool LLFileSystem::read(U8* buffer, S32 bytes)