From 43cdddd715ff71ddc447c1d47f5d4f3868ecafb4 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> Date: Wed, 17 Dec 2025 17:27:47 +0200 Subject: #4899 Fix erros related to negative file size --- indra/llcommon/llfile.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/llcommon/llfile.cpp') diff --git a/indra/llcommon/llfile.cpp b/indra/llcommon/llfile.cpp index ec4e15c690..0ceb2eb03b 100755 --- a/indra/llcommon/llfile.cpp +++ b/indra/llcommon/llfile.cpp @@ -564,7 +564,8 @@ S64 LLFile::size(std::error_code& ec) return statval.st_size; } #endif - return set_ec_from_system_error(ec); + set_ec_from_system_error(ec); + return 0; } S64 LLFile::tell(std::error_code& ec) @@ -1070,7 +1071,8 @@ S64 LLFile::size(const std::string& filename, int suppress_warning) std::intmax_t size = static_cast(std::filesystem::file_size(file_path, ec)); if (ec) { - return warnif("size", filename, ec, suppress_warning); + warnif("size", filename, ec, suppress_warning); + return 0; } return size; } -- cgit v1.3