From 65d35006de65e540355833a56bcaa7659f6f1afd Mon Sep 17 00:00:00 2001 From: Oliver Reiche Date: Tue, 12 Dec 2023 11:09:36 +0100 Subject: Filesystem: Fix copy overwrite of symlink with file ... and improve log messages in case of failure. --- src/buildtool/file_system/file_system_manager.hpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/buildtool/file_system/file_system_manager.hpp') diff --git a/src/buildtool/file_system/file_system_manager.hpp b/src/buildtool/file_system/file_system_manager.hpp index 181cba27..71b319d1 100644 --- a/src/buildtool/file_system/file_system_manager.hpp +++ b/src/buildtool/file_system/file_system_manager.hpp @@ -1013,9 +1013,8 @@ class FileSystemManager { std::filesystem::copy_options::overwrite_existing) noexcept -> bool { try { - // src and dst should be actual files - if (std::filesystem::is_symlink(src) or - std::filesystem::is_symlink(dst)) { + // src should be an actual file + if (std::filesystem::is_symlink(src)) { return false; } if (not RemoveFile(dst)) { -- cgit v1.2.3