checkFolderSizeLimit(path, callback);
}
+void DiscoveryPhase::checkSelectiveSyncExistingFolder(const QString &path, const RemotePermissions &rp, const qint64 folderSize)
+{
+ // 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)) {
+ return;
+ } else if (folderSize >= _syncOptions._newBigFolderSizeLimit) { // If the folder is too big, notify the user and prompt for response.
+ const auto isExternalStorage =
+ _syncOptions._confirmExternalStorage && _syncOptions._vfs->mode() == Vfs::Off && rp.hasPermission(RemotePermissions::IsMounted);
+ emit newBigFolder(path, isExternalStorage);
+ }
+}
+
/* Given a path on the remote, give the path as it is when the rename is done */
QString DiscoveryPhase::adjustRenamedPath(const QString &original, SyncFileItem::Direction d) const
{
const RemotePermissions rp,
const std::function<void(bool)> callback);
+ void checkSelectiveSyncExistingFolder(const QString &path, const RemotePermissions &rp, const qint64 folderSize);
+
/** Given an original path, return the target path obtained when renaming is done.
*
* Note that it only considers parent directory renames. So if A/B got renamed to C/D,