diff --git a/worker.cpp b/worker.cpp index eb4b188..b453444 100644 --- a/worker.cpp +++ b/worker.cpp @@ -215,17 +215,17 @@ void Worker::update() { bool Worker::isRepositoryCorrupted() { QDir customerRepository(m_customerRepository); if (customerRepository.exists()) { - QDir customerRepositoryEtc(QDir::cleanPath(m_customerRepository + QDir::separator() + "etc/")); - QDir customerRepositoryOpt(QDir::cleanPath(m_customerRepository + QDir::separator() + "opt/")); QDir customerRepositoryGit(QDir::cleanPath(m_customerRepository + QDir::separator() + ".git/")); - if (!m_gc.gitFsck() - // etc-directory inside git-repository does not exist, which means the - // git-repository is corrupted -> remove it and start from scratch - || !customerRepositoryEtc.exists() - || !customerRepositoryGit.exists() - || !customerRepositoryOpt.exists()) { + if (!m_gc.gitFsck()) { // should never happen - Utils::printCriticalErrorMsg("CORRUPTED CUSTOMER REPOSITORY"); + Utils::printCriticalErrorMsg("CORRUPTED CUSTOMER REPOSITORY: GIT_FSCK FAILED"); + return true; + } + // .git-directory inside git-repository does not exist, which means the + // git-repository is corrupted -> remove it and start from scratch + if (!customerRepositoryGit.exists()) { + // should never happen + Utils::printCriticalErrorMsg("CORRUPTED CUSTOMER REPOSITORY .GIT DOES NOT EXIST"); return true; } }