diff options
author | Oliver Reiche <oliver.reiche@huawei.com> | 2023-12-12 11:09:36 +0100 |
---|---|---|
committer | Oliver Reiche <oliver.reiche@huawei.com> | 2023-12-13 15:23:11 +0100 |
commit | 599dddc182b702192252753c76429d3da44aa463 (patch) | |
tree | efe6512905b3c75026d80fb9f7ff2a4e3558e9f5 /src/buildtool/file_system/file_system_manager.hpp | |
parent | 94de8e505ca7812e5ae572cdbf75243a7bdc99bf (diff) | |
download | justbuild-599dddc182b702192252753c76429d3da44aa463.tar.gz |
Filesystem: Fix copy overwrite of symlink with file
... and improve log messages in case of failure.
(cherry picked from commit 65d35006de65e540355833a56bcaa7659f6f1afd)
Diffstat (limited to 'src/buildtool/file_system/file_system_manager.hpp')
-rw-r--r-- | src/buildtool/file_system/file_system_manager.hpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/buildtool/file_system/file_system_manager.hpp b/src/buildtool/file_system/file_system_manager.hpp index d905f301..fa0fcfb3 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)) { |