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 {