diff options
| author | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2025-12-17 17:27:47 +0200 |
|---|---|---|
| committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2026-01-07 02:15:43 +0200 |
| commit | 43cdddd715ff71ddc447c1d47f5d4f3868ecafb4 (patch) | |
| tree | 254fb183c3b9f83ea7b08a1a3b479db409490693 /indra/llcommon/llfile.cpp | |
| parent | 59257c136e2baa00a7ff74f462a9fd210e5dc5fc (diff) | |
#4899 Fix erros related to negative file size
Diffstat (limited to 'indra/llcommon/llfile.cpp')
| -rwxr-xr-x | indra/llcommon/llfile.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
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::intmax_t>(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; } |
