diff options
| author | Frederick Martian <fredmartian@gmail.com> | 2025-11-28 13:30:36 +0100 |
|---|---|---|
| committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2025-12-10 20:33:58 +0200 |
| commit | 13a3cf92ca9e647dfc39e761ce0068aa021ca657 (patch) | |
| tree | 5737102fc4c357ab6488839162eb8c069d206f50 /indra/llfilesystem | |
| parent | 62e08e13d00d62a996a01fff20ad18c1886f3c8a (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')
| -rwxr-xr-x | indra/llfilesystem/llfilesystem.cpp | 4 |
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) |
