From 9f31531f6587b4e69b222bc9b674f7d5f33bd98d Mon Sep 17 00:00:00 2001 From: Dan Engelbrecht Date: Wed, 22 Oct 2025 11:08:26 +0200 Subject: fix error log when using TryCloneFile on Mac/Linux (#597) --- src/zencore/filesystem.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/zencore/filesystem.cpp') diff --git a/src/zencore/filesystem.cpp b/src/zencore/filesystem.cpp index c7afe702c..8a58f136e 100644 --- a/src/zencore/filesystem.cpp +++ b/src/zencore/filesystem.cpp @@ -1029,12 +1029,10 @@ TryCloneFile(const std::filesystem::path& FromPath, const std::filesystem::path& return false; # endif // 0 ZEN_UNUSED(FromPath, ToPath); - ZEN_ERROR("CloneFile() is not implemented on this platform"); return false; #elif ZEN_PLATFORM_MAC /* clonefile() syscall if APFS */ ZEN_UNUSED(FromPath, ToPath); - ZEN_ERROR("CloneFile() is not implemented on this platform"); return false; #endif // ZEN_PLATFORM_WINDOWS } @@ -1063,7 +1061,6 @@ CopyFile(const std::filesystem::path& FromPath, const std::filesystem::path& ToP if (Options.EnableClone) { Success = TryCloneFile(FromPath.native(), ToPath.native()); - if (Success) { return true; @@ -1072,6 +1069,9 @@ CopyFile(const std::filesystem::path& FromPath, const std::filesystem::path& ToP if (Options.MustClone) { +#if ZEN_PLATFORM_MAC || ZEN_PLATFORM_LINUX + ZEN_ERROR("CloneFile() is not implemented on this platform"); +#endif // ZEN_PLATFORM_MAC || ZEN_PLATFORM_LINUX return false; } -- cgit v1.2.3