From 13a3cf92ca9e647dfc39e761ce0068aa021ca657 Mon Sep 17 00:00:00 2001 From: Frederick Martian Date: Fri, 28 Nov 2025 13:30:36 +0100 Subject: - 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 --- indra/llfilesystem/llfilesystem.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/llfilesystem') 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) -- cgit v1.3