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/main/install_cas.cpp | 8 -------- 1 file changed, 8 deletions(-) (limited to 'src/buildtool/main/install_cas.cpp') diff --git a/src/buildtool/main/install_cas.cpp b/src/buildtool/main/install_cas.cpp index 622e7a1f..b0a2d2f6 100644 --- a/src/buildtool/main/install_cas.cpp +++ b/src/buildtool/main/install_cas.cpp @@ -103,14 +103,6 @@ auto FetchAndInstallArtifacts( output_path.parent_path().string()); return false; } - if (FileSystemManager::Exists(output_path)) { - if (not FileSystemManager::RemoveFile(output_path)) { - Logger::Log(LogLevel::Error, - "Failed to remote target location {}.", - output_path.string()); - return false; - } - } if (not api->RetrieveToPaths( {object_info}, {output_path}, alternative_api)) { Logger::Log(LogLevel::Error, "failed to retrieve artifact."); -- cgit v1.2.3