mirror of
https://github.com/Murmele/Gittyup.git
synced 2024-09-11 02:35:41 +03:00
Execute cdUp always
Description: In Debug mode the asserts are activated, but in Release mode not. In this case in the release build the cdUp will just be ignored.
This commit is contained in:
parent
fbb4867afa
commit
00a9ad1a20
@ -156,7 +156,11 @@ QDir Repository::dir(bool includeGitFolder) const {
|
||||
QDir dir(git_repository_path(d->repo));
|
||||
if (!includeGitFolder) {
|
||||
assert(dir.dirName() == ".git");
|
||||
assert(dir.cdUp());
|
||||
if (!dir.cdUp()) {
|
||||
assert(false); // must be done explicit, because in release build the
|
||||
// assert will not be executed, so assert(dir.cdUp()) does
|
||||
// not work in release build
|
||||
}
|
||||
}
|
||||
return dir;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user