]> dgit.raspbian.org Git - nextcloud-desktop.git/commitdiff
Small coding improvements
authorDries Mys <dries.mys@my-dreams.be>
Wed, 19 Jul 2023 08:55:36 +0000 (10:55 +0200)
committerMatthieu Gallien <matthieu_gallien@yahoo.fr>
Thu, 20 Jul 2023 11:44:55 +0000 (13:44 +0200)
Signed-off-by: Dries Mys <dries.mys@my-dreams.be>
src/gui/folder.cpp
src/libsync/vfs/cfapi/vfs_cfapi.cpp

index 664054a37f2ad44a25ba2eb9af157b90e445105f..e9f05e79f29897836626680a523c22a8a4071661 100644 (file)
@@ -564,15 +564,17 @@ void Folder::slotWatchedPathChanged(const QString &path, ChangeReason reason)
     if (pathIsIgnored(path)) {
         const auto pinState = _vfs->pinState(relativePath.toString());
         if (!pinState || *pinState != PinState::Excluded) {
-            if (!_vfs->setPinState(relativePath.toString(), PinState::Excluded))
+            if (!_vfs->setPinState(relativePath.toString(), PinState::Excluded)) {
                 qCWarning(lcFolder) << "Could not set pin state of" << relativePath << "to excluded";
+            }
         }
         return;
     } else {
         const auto pinState = _vfs->pinState(relativePath.toString());
         if (pinState && *pinState == PinState::Excluded) {
-            if (!_vfs->setPinState(relativePath.toString(), PinState::Inherited))
+            if (!_vfs->setPinState(relativePath.toString(), PinState::Inherited)) {
                 qCWarning(lcFolder) << "Could not switch pin state of" << relativePath << "from" << *pinState << "to inherited";
+            }
         }
     }
 
index 1c5c3e91c6c5182469e5d6f5d0b079b7f829cc13..931da6f1938e6497ac408baad275ec94db779b3f 100644 (file)
@@ -229,8 +229,9 @@ Result<Vfs::ConvertToPlaceholderResult, QString> VfsCfApi::convertToPlaceholder(
     if (item._type != ItemTypeDirectory && OCC::FileSystem::isLnkFile(filename)) {
         qCInfo(lcCfApi) << "File \"" << filename << "\" is a Windows shortcut. Not converting it to a placeholder.";
         const auto pinState = pinStateLocal(localPath);
-        if (!pinState || *pinState != PinState::Excluded)
+        if (!pinState || *pinState != PinState::Excluded) {
             setPinStateLocal(localPath, PinState::Excluded);
+        }
         return Vfs::ConvertToPlaceholderResult::Ok;
     }