From 04e2f0aa0ccfe4f39c5f6c713bde182c6b7704dd Mon Sep 17 00:00:00 2001 From: Oliver Reiche Date: Fri, 3 Nov 2023 13:54:26 +0100 Subject: bugfix: Also unlink symlinks before installing Make sure that all CopyFile, WriteFile, and CreateSymlink functions properly unlink the target file (if it exists and overwrite requested) to avoid interferences of the install command. With this change, the clean up step for install-cas and the within GraphTraverser can new be omitted. --- src/buildtool/graph_traverser/graph_traverser.hpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src/buildtool/graph_traverser/graph_traverser.hpp') diff --git a/src/buildtool/graph_traverser/graph_traverser.hpp b/src/buildtool/graph_traverser/graph_traverser.hpp index df5fa65f..0eee1a80 100644 --- a/src/buildtool/graph_traverser/graph_traverser.hpp +++ b/src/buildtool/graph_traverser/graph_traverser.hpp @@ -522,15 +522,7 @@ class GraphTraverser { std::vector output_paths{}; output_paths.reserve(rel_paths.size()); for (auto const& rel_path : rel_paths) { - auto output_path = clargs_.stage->output_dir / rel_path; - if (FileSystemManager::IsFile(output_path) and - not FileSystemManager::RemoveFile(output_path)) { - Logger::Log(LogLevel::Error, - "Could not clean output path {}", - output_path.string()); - return std::nullopt; - } - output_paths.emplace_back(std::move(output_path)); + output_paths.emplace_back(clargs_.stage->output_dir / rel_path); } return output_paths; } -- cgit v1.2.3