mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-26 06:55:59 +03:00
no oneliner if: a bug waiting to happen
it is much too easy to get a bug because one could miss the lask of { and } Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
This commit is contained in:
parent
51a77bac28
commit
b0ef5e0635
1 changed files with 6 additions and 3 deletions
|
@ -1106,15 +1106,18 @@ qint64 PropagateRootDirectory::committedDiskSpace() const
|
|||
|
||||
bool PropagateRootDirectory::scheduleSelfOrChild()
|
||||
{
|
||||
if (_state == Finished)
|
||||
if (_state == Finished) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (PropagateDirectory::scheduleSelfOrChild())
|
||||
if (PropagateDirectory::scheduleSelfOrChild()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Important: Finish _subJobs before scheduling any deletes.
|
||||
if (_subJobs._state != Finished)
|
||||
if (_subJobs._state != Finished) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return _dirDeletionJobs.scheduleSelfOrChild();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue