if (excluded == CSYNC_NOT_EXCLUDED && !isSymlink) {
return false;
} else if (excluded == CSYNC_FILE_SILENTLY_EXCLUDED || excluded == CSYNC_FILE_EXCLUDE_AND_REMOVE) {
+ emit _discoveryData->silentlyExcluded(path);
return true;
}
void firstDirectoryPermissions(RemotePermissions);
void etag(const QString &);
void finished(const HttpResult<QVector<RemoteInfo>> &result);
+
private slots:
void directoryListingIteratedSlot(QString, const QMap<QString, QString> &);
void lsJobFinishedWithoutErrorSlot();
// A new folder was discovered and was not synced because of the confirmation feature
void newBigFolder(const QString &folder, bool isExternal);
+
+ /** For excluded items that don't show up in itemDiscovered()
+ *
+ * The path is relative to the sync folder, similar to item->_file
+ */
+ void silentlyExcluded(const QString &folderPath);
};
/// Implementation of DiscoveryPhase::adjustRenamedPath
finalize(false);
});
connect(_discoveryPhase.data(), &DiscoveryPhase::finished, this, &SyncEngine::slotDiscoveryFinished);
+ connect(_discoveryPhase.data(), &DiscoveryPhase::silentlyExcluded,
+ _syncFileStatusTracker.data(), &SyncFileStatusTracker::slotAddSilentlyExcluded);
auto discoveryJob = new ProcessDirectoryJob(SyncFileItemPtr(), ProcessDirectoryJob::NormalQuery, ProcessDirectoryJob::NormalQuery,
_discoveryPhase.data(), _discoveryPhase.data());
// update the exclude list at runtime and doing it statically here removes
// our ability to notify changes through the fileStatusChanged signal,
// it's an acceptable compromize to treat all exclude types the same.
+ // Update: This extra check shouldn't hurt even though silently excluded files
+ // are now available via slotAddSilentlyExcluded().
if (_syncEngine->excludedFiles().isExcluded(_syncEngine->localPath() + relativePath,
_syncEngine->localPath(),
_syncEngine->ignoreHiddenFiles())) {
emit fileStatusChanged(fileName, SyncFileStatus::StatusSync);
}
+void SyncFileStatusTracker::slotAddSilentlyExcluded(const QString &folderPath)
+{
+ _syncProblems[folderPath] = SyncFileStatus::StatusWarning;
+ emit fileStatusChanged(getSystemDestination(folderPath), resolveSyncAndErrorStatus(folderPath, NotShared));
+}
+
void SyncFileStatusTracker::incSyncCountAndEmitStatusChanged(const QString &relativePath, SharedFlag sharedFlag)
{
// Will return 0 (and increase to 1) if the path wasn't in the map yet
public slots:
void slotPathTouched(const QString &fileName);
+ // path relative to folder
+ void slotAddSilentlyExcluded(const QString &folderPath);
signals:
void fileStatusChanged(const QString &systemFileName, SyncFileStatus fileStatus);