Handle signatures when cleaning up repository

This commit is contained in:
Martchus 2021-03-15 18:27:04 +01:00
parent 1c75e8f957
commit 307322ab11
1 changed files with 8 additions and 0 deletions

View File

@ -707,6 +707,14 @@ void CleanRepository::run()
continue; continue;
} }
// delete orphaned signatures, otherwise skip signatures as they are handled alongside the related package
if (fileName.ends_with(".sig")) {
if (!std::filesystem::exists(dirInfo.canonicalPath / std::string_view(fileName.data(), fileName.data() + fileName.size() - 4))) {
dirInfo.toDelete.emplace_back(fileName);
}
continue;
}
// determine package name from file name // determine package name from file name
const auto [packageName, error] = [&fileName] { const auto [packageName, error] = [&fileName] {
try { try {