diff --git a/src/libsync/discoveryphase.cpp b/src/libsync/discoveryphase.cpp index 6f7c7f9ff5ae..c52cd530dafb 100644 --- a/src/libsync/discoveryphase.cpp +++ b/src/libsync/discoveryphase.cpp @@ -13,6 +13,7 @@ */ #include "discoveryphase.h" +#include "configfile.h" #include "discovery.h" #include "helpers.h" #include "progressdispatcher.h" @@ -87,6 +88,11 @@ bool DiscoveryPhase::activeFolderSizeLimit() const return _syncOptions._newBigFolderSizeLimit > 0 && _syncOptions._vfs->mode() == Vfs::Off; } +bool DiscoveryPhase::notifyExistingFolderOverLimit() const +{ + return activeFolderSizeLimit() && ConfigFile().notifyExistingFoldersOverLimit(); +} + void DiscoveryPhase::checkFolderSizeLimit(const QString &path, const std::function completionCallback) { if (!activeFolderSizeLimit()) { @@ -152,9 +158,8 @@ void DiscoveryPhase::checkSelectiveSyncNewFolder(const QString &path, void DiscoveryPhase::checkSelectiveSyncExistingFolder(const QString &path) { - // TODO: Check for setting to obey big folder sync // If no size limit is enforced, or if is in whitelist (explicitly allowed) or in blacklist (explicitly disallowed), do nothing. - if (!activeFolderSizeLimit() || findPathInList(_selectiveSyncWhiteList, path) || findPathInList(_selectiveSyncBlackList, path)) { + if (!notifyExistingFolderOverLimit() || findPathInList(_selectiveSyncWhiteList, path) || findPathInList(_selectiveSyncBlackList, path)) { return; } diff --git a/src/libsync/discoveryphase.h b/src/libsync/discoveryphase.h index 4736b35d86cf..890f09bc8166 100644 --- a/src/libsync/discoveryphase.h +++ b/src/libsync/discoveryphase.h @@ -255,7 +255,8 @@ class DiscoveryPhase : public QObject [[nodiscard]] bool isInSelectiveSyncBlackList(const QString &path) const; [[nodiscard]] bool activeFolderSizeLimit() const; - + [[nodiscard]] bool notifyExistingFolderOverLimit() const; + void checkFolderSizeLimit(const QString &path, const std::function callback);