From 5a6d68b318cee4c2fb3f9656b9f3e8940474fd72 Mon Sep 17 00:00:00 2001 From: Martchus Date: Sat, 7 May 2022 01:59:14 +0200 Subject: [PATCH] Fix using files DB in CleanRepository --- librepomgr/buildactions/repomanagement.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/librepomgr/buildactions/repomanagement.cpp b/librepomgr/buildactions/repomanagement.cpp index 856d809..f13ab7b 100644 --- a/librepomgr/buildactions/repomanagement.cpp +++ b/librepomgr/buildactions/repomanagement.cpp @@ -589,7 +589,10 @@ void CleanRepository::run() auto parentPath = std::filesystem::path(); try { auto archSpecificPath = std::filesystem::canonical(db->localPkgDir); - const auto dbFile = argsToString(archSpecificPath, '/', !db->path.empty() ? fileName(std::string_view(db->path)) : (db->name + ".db")); + const auto dbFile = argsToString(archSpecificPath, '/', + m_setup.building.loadFilesDbs && !db->filesPath.empty() + ? fileName(std::string_view(db->filesPath)) + : (!db->path.empty() ? fileName(std::string_view(db->path)) : (db->name + ".db"))); const auto lastModified = LibPkg::lastModified(dbFile); if (lastModified != db->lastUpdate) { m_messages.errors.emplace_back("The db file's last modification (" % lastModified.toString() % ") does not match the last db update ("