From a6925de9bca8579637fa8a4152ab2b77ef5ca90e Mon Sep 17 00:00:00 2001 From: Dan Engelbrecht Date: Mon, 13 Oct 2025 13:32:36 +0200 Subject: refactor builds cmd (#566) Move builds download code from builds_cmd.cpp to remotestorelib --- src/zencore/filesystem.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/zencore/filesystem.cpp') diff --git a/src/zencore/filesystem.cpp b/src/zencore/filesystem.cpp index 5ac460fd9..8c5040397 100644 --- a/src/zencore/filesystem.cpp +++ b/src/zencore/filesystem.cpp @@ -2917,16 +2917,16 @@ PickDefaultSystemRootDirectory() #if ZEN_PLATFORM_WINDOWS uint32_t -GetFileAttributes(const std::filesystem::path& Filename, std::error_code& Ec) +GetFileAttributesFromPath(const std::filesystem::path& Filename, std::error_code& Ec) { return WinGetFileAttributes(Filename, Ec); } uint32_t -GetFileAttributes(const std::filesystem::path& Filename) +GetFileAttributesFromPath(const std::filesystem::path& Filename) { std::error_code Ec; - uint32_t Result = zen::GetFileAttributes(Filename, Ec); + uint32_t Result = GetFileAttributesFromPath(Filename, Ec); if (Ec) { throw std::system_error(Ec, fmt::format("failed to get attributes of file '{}'", Filename.string())); @@ -2935,7 +2935,7 @@ GetFileAttributes(const std::filesystem::path& Filename) } void -SetFileAttributes(const std::filesystem::path& Filename, uint32_t Attributes, std::error_code& Ec) +SetFileAttributesToPath(const std::filesystem::path& Filename, uint32_t Attributes, std::error_code& Ec) { if (::SetFileAttributes(Filename.native().c_str(), Attributes) == 0) { @@ -2944,10 +2944,10 @@ SetFileAttributes(const std::filesystem::path& Filename, uint32_t Attributes, st } void -SetFileAttributes(const std::filesystem::path& Filename, uint32_t Attributes) +SetFileAttributesToPath(const std::filesystem::path& Filename, uint32_t Attributes) { std::error_code Ec; - zen::SetFileAttributes(Filename, Attributes, Ec); + zen::SetFileAttributesToPath(Filename, Attributes, Ec); if (Ec) { throw std::system_error(Ec, fmt::format("failed to set attributes of file {}", Filename.string())); @@ -3010,7 +3010,7 @@ bool SetFileReadOnly(const std::filesystem::path& Filename, bool ReadOnly, std::error_code& Ec) { #if ZEN_PLATFORM_WINDOWS - uint32_t CurrentAttributes = GetFileAttributes(Filename, Ec); + uint32_t CurrentAttributes = GetFileAttributesFromPath(Filename, Ec); if (Ec) { return false; @@ -3023,7 +3023,7 @@ SetFileReadOnly(const std::filesystem::path& Filename, bool ReadOnly, std::error uint32_t NewAttributes = MakeFileAttributeReadOnly(CurrentAttributes, ReadOnly); if (CurrentAttributes != NewAttributes) { - SetFileAttributes(Filename, NewAttributes, Ec); + SetFileAttributesToPath(Filename, NewAttributes, Ec); if (Ec) { return false; -- cgit v1.2.3