this, &Folder::slotItemCompleted);
connect(_engine.data(), &SyncEngine::newBigFolder,
this, &Folder::slotNewBigFolderDiscovered);
+ connect(_engine.data(), &SyncEngine::existingFolderNowBig, this, &Folder::slotExistingFolderNowBig);
connect(_engine.data(), &SyncEngine::seenLockedFile, FolderMan::instance(), &FolderMan::slotSyncOnceFileUnlocks);
connect(_engine.data(), &SyncEngine::aboutToPropagate,
this, &Folder::slotLogPropagationStart);
ENFORCE(dbEntry.isDirectory());
if (differingSize) {
- _discoveryData->checkSelectiveSyncExistingFolder(path._server, serverEntry.remotePerm, sizeOnServer);
+ _discoveryData->checkSelectiveSyncExistingFolder(path._server, sizeOnServer);
}
item->_instruction = CSYNC_INSTRUCTION_UPDATE_METADATA;
checkFolderSizeLimit(path, callback);
}
-void DiscoveryPhase::checkSelectiveSyncExistingFolder(const QString &path, const RemotePermissions &rp, const qint64 folderSize)
+void DiscoveryPhase::checkSelectiveSyncExistingFolder(const QString &path, 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);
+ emit existingFolderNowBig(path);
}
}
const RemotePermissions rp,
const std::function<void(bool)> callback);
- void checkSelectiveSyncExistingFolder(const QString &path, const RemotePermissions &rp, const qint64 folderSize);
+ void checkSelectiveSyncExistingFolder(const QString &path, const qint64 folderSize);
/** Given an original path, return the target path obtained when renaming is done.
*
// A new folder was discovered and was not synced because of the confirmation feature
void newBigFolder(const QString &folder, bool isExternal);
+ void existingFolderNowBig(const QString &folder);
/** For excluded items that don't show up in itemDiscovered()
*
connect(_discoveryPhase.data(), &DiscoveryPhase::itemDiscovered, this, &SyncEngine::slotItemDiscovered);
connect(_discoveryPhase.data(), &DiscoveryPhase::newBigFolder, this, &SyncEngine::newBigFolder);
+ connect(_discoveryPhase.data(), &DiscoveryPhase::existingFolderNowBig, this, &SyncEngine::existingFolderNowBig);
connect(_discoveryPhase.data(), &DiscoveryPhase::fatalError, this, [this](const QString &errorString, ErrorCategory errorCategory) {
Q_EMIT syncError(errorString, errorCategory);
finalize(false);
// A new folder was discovered and was not synced because of the confirmation feature
void newBigFolder(const QString &folder, bool isExternal);
+ void existingFolderNowBig(const QString &folder);
+
/** Emitted when propagation has problems with a locked file.
*
* Forwarded from OwncloudPropagator::seenLockedFile.