Fix using files DB in CleanRepository
This commit is contained in:
parent
c2d5e2f749
commit
5a6d68b318
|
@ -589,7 +589,10 @@ void CleanRepository::run()
|
||||||
auto parentPath = std::filesystem::path();
|
auto parentPath = std::filesystem::path();
|
||||||
try {
|
try {
|
||||||
auto archSpecificPath = std::filesystem::canonical(db->localPkgDir);
|
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);
|
const auto lastModified = LibPkg::lastModified(dbFile);
|
||||||
if (lastModified != db->lastUpdate) {
|
if (lastModified != db->lastUpdate) {
|
||||||
m_messages.errors.emplace_back("The db file's last modification (" % lastModified.toString() % ") does not match the last db update ("
|
m_messages.errors.emplace_back("The db file's last modification (" % lastModified.toString() % ") does not match the last db update ("
|
||||||
|
|
Loading…
Reference in New Issue