From 2adc80e5fc8337232d77102e1571a98d5bcc198c Mon Sep 17 00:00:00 2001 From: Martchus Date: Wed, 3 Nov 2021 16:32:38 +0100 Subject: [PATCH] Override existing symlinks when adding signatures to repo --- librepomgr/buildactions/conductbuild.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/librepomgr/buildactions/conductbuild.cpp b/librepomgr/buildactions/conductbuild.cpp index cf63cd5..7476564 100644 --- a/librepomgr/buildactions/conductbuild.cpp +++ b/librepomgr/buildactions/conductbuild.cpp @@ -1182,9 +1182,7 @@ void ConductBuild::invokeGpg( std::filesystem::copy(buildDirSignaturePath, argsToString(signingSession->repoPath, "/../any/", binaryPackageName, ".sig"), std::filesystem::copy_options::overwrite_existing); const auto symlink = std::filesystem::path(argsToString(signingSession->repoPath, '/', binaryPackageName, ".sig")); - if (std::filesystem::exists(symlink) && !std::filesystem::is_symlink(symlink)) { - std::filesystem::remove(symlink); - } + std::filesystem::remove(symlink); std::filesystem::create_symlink("../any/" % binaryPackageName + ".sig", symlink); return; }