From f2dc325774c0f3e32f106538ab8923e4d7008bd6 Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Thu, 8 Aug 2024 19:33:16 -0500 Subject: [PATCH] updated build system --- support/src/utils/file.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/support/src/utils/file.cpp b/support/src/utils/file.cpp index 390bf183..1f9ce7a4 100644 --- a/support/src/utils/file.cpp +++ b/support/src/utils/file.cpp @@ -141,14 +141,12 @@ auto get_file_size(std::string_view path, std::uint64_t &file_size) -> bool { } file_size = static_cast(st.st_size); + return true; #else // !defined(_WIN32) std::error_code ec{}; file_size = std::filesystem::file_size(abs_path, ec); - if (not ec) { - return false; - } + return (ec.value() == 0); #endif // defined(_WIN32) - return true; } auto get_file_size(std::wstring_view path, std::uint64_t &file_size) -> bool {