refactor
Some checks reported errors
BlockStorage/repertory/pipeline/head Something is wrong with the build of this commit
BlockStorage/repertory_mac/pipeline/head This commit looks good

This commit is contained in:
2025-08-04 22:15:23 -05:00
parent efafa6bf68
commit 957a9f9c15
34 changed files with 959 additions and 971 deletions

View File

@@ -33,13 +33,13 @@ namespace {
file_size = 0U;
#if defined(_WIN32)
struct _stat64 st{};
auto res = _stat64(std::string{path}.c_str(), &st);
struct _stat64 u_stat{};
auto res = _stat64(std::string{path}.c_str(), &u_stat);
if (res != 0) {
return false;
}
file_size = static_cast<std::uint64_t>(st.st_size);
file_size = static_cast<std::uint64_t>(u_stat.st_size);
return true;
#else // !defined(_WIN32)
std::error_code ec{};
@@ -55,8 +55,9 @@ namespace {
return ((::PathFileExistsA(abs_path.c_str()) != 0) &&
(::PathIsDirectoryA(abs_path.c_str()) == 0));
#else // !defined(_WIN32)
struct stat64 st{};
return (stat64(abs_path.c_str(), &st) == 0 && not S_ISDIR(st.st_mode));
struct stat64 u_stat{};
return (stat64(abs_path.c_str(), &u_stat) == 0 &&
not S_ISDIR(u_stat.st_mode));
#endif // defined(_WIN32)
}
} // namespace