diff --git a/src/gui/folder.cpp b/src/gui/folder.cpp index 664054a37f2a..e9f05e79f298 100644 --- a/src/gui/folder.cpp +++ b/src/gui/folder.cpp @@ -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"; + } } } diff --git a/src/libsync/vfs/cfapi/vfs_cfapi.cpp b/src/libsync/vfs/cfapi/vfs_cfapi.cpp index 1c5c3e91c6c5..931da6f1938e 100644 --- a/src/libsync/vfs/cfapi/vfs_cfapi.cpp +++ b/src/libsync/vfs/cfapi/vfs_cfapi.cpp @@ -229,8 +229,9 @@ Result 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; }