diff --git a/src/libsync/vfs/cfapi/vfs_cfapi.cpp b/src/libsync/vfs/cfapi/vfs_cfapi.cpp index 64779407f2a9f..27f8f945792af 100644 --- a/src/libsync/vfs/cfapi/vfs_cfapi.cpp +++ b/src/libsync/vfs/cfapi/vfs_cfapi.cpp @@ -354,7 +354,7 @@ Vfs::AvailabilityResult VfsCfApi::availability(const QString &folderPath, const break; }; return VfsItemAvailability::Mixed; - } else { + } else if (basePinState) { const auto hydrationAndPinStates = computeRecursiveHydrationAndPinStates(folderPath, basePinState); const auto pin = hydrationAndPinStates.pinState; @@ -382,6 +382,8 @@ Vfs::AvailabilityResult VfsCfApi::availability(const QString &folderPath, const } } return AvailabilityError::NoSuchItem; + } else { + return AvailabilityError::NoSuchItem; } }