fix cdUp logic

This commit is contained in:
Yann Salmon 2024-04-01 16:52:02 +02:00 committed by Martin Marmsoler
parent ef6984cdae
commit de7704a1b1

View File

@ -154,8 +154,7 @@ Repository::operator git_repository *() const { return d->repo; }
QDir Repository::dir(bool includeGitFolder) const {
QDir dir(git_repository_path(d->repo));
if (!includeGitFolder) {
assert(dir.dirName() == ".git");
if (!includeGitFolder && dir.dirName() == ".git") {
if (!dir.cdUp()) {
assert(false); // must be done explicit, because in release build the
// assert will not be executed, so assert(dir.cdUp()) does