Virtual files: don't check for new big folders
authorOlivier Goffart <ogoffart@woboq.com>
Thu, 30 Aug 2018 16:14:33 +0000 (18:14 +0200)
committerKevin Ottens <kevin.ottens@nextcloud.com>
Tue, 15 Dec 2020 09:58:06 +0000 (10:58 +0100)
https://github.com/owncloud/client/issues/6724#issuecomment-417368475

src/libsync/discoveryphase.cpp

index d7aa729a99e1d314484f3ace01c28f4401eab24f..0b8e8874d6e1aa5e082462aac386d490efcf35af 100644 (file)
@@ -76,7 +76,7 @@ bool DiscoveryPhase::isInSelectiveSyncBlackList(const QString &path) const
 
 bool DiscoveryPhase::checkSelectiveSyncNewFolder(const QString &path, RemotePermissions remotePerm)
 {
-    if (_syncOptions._confirmExternalStorage
+    if (_syncOptions._confirmExternalStorage && !_syncOptions._newFilesAreVirtual
         && remotePerm.hasPermission(RemotePermissions::IsMounted)) {
         // external storage.
 
@@ -99,7 +99,7 @@ bool DiscoveryPhase::checkSelectiveSyncNewFolder(const QString &path, RemotePerm
     }
 
     auto limit = _syncOptions._newBigFolderSizeLimit;
-    if (limit < 0) {
+    if (limit < 0 || _syncOptions._newFilesAreVirtual) {
         // no limit, everything is allowed;
         return false;
     }