From b0ef5e06354e8a7c9733c2c7d47db257c020ae42 Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Wed, 8 Sep 2021 12:11:03 +0200 Subject: [PATCH] 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 --- src/libsync/owncloudpropagator.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/libsync/owncloudpropagator.cpp b/src/libsync/owncloudpropagator.cpp index 29dc5f23f..f13e69fe5 100644 --- a/src/libsync/owncloudpropagator.cpp +++ b/src/libsync/owncloudpropagator.cpp @@ -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(); } -- 2.30.2