When checking the sanity of the customer repository, check also for existence

of etc-directory inside repository.
This commit is contained in:
Gerhard Hoffmann 2023-12-13 13:42:12 +01:00
parent 07dcf0ba30
commit 6f5c8103e4

View File

@ -214,6 +214,12 @@ bool Worker::isRepositoryCorrupted() {
Utils::printCriticalErrorMsg("CORRUPTED CUSTOMER REPOSITORY .GIT DOES NOT EXIST");
return true;
}
QDir customerRepositoryEtc(QDir::cleanPath(m_customerRepository + QDir::separator() + "etc/"));
if (!customerRepositoryEtc.exists()) {
// should never happen
Utils::printCriticalErrorMsg(QString("CORRUPTED CUSTOMER REPOSITORY %1/etc DOES NOT EXIST").arg(m_customerRepository));
return true;
}
}
return false;
}