void start();
void abort();
+ SyncFileItemPtr _dirItem;
+
private:
struct PathTuple
{
QPointer<DiscoverServerJob> _serverJob;
std::deque<ProcessDirectoryJob *> _queuedJobs;
QVector<ProcessDirectoryJob *> _runningJobs;
- SyncFileItemPtr _dirItem;
QueryMode _queryServer;
QueryMode _queryLocal;
DiscoveryPhase *_discoveryData;
_discoveryPhase.data(), this);
// FIXME! this sucks
auto runQueuedJob = [this](ProcessDirectoryJob *job, const auto &runQueuedJob) -> void {
- connect(job, &ProcessDirectoryJob::finished, this, [this, runQueuedJob] {
+ connect(job, &ProcessDirectoryJob::finished, this, [this, job, runQueuedJob] {
+ if (job->_dirItem)
+ job->itemDiscovered(job->_dirItem);
sender()->deleteLater();
if (!_discoveryPhase->_queuedDeletedDirectories.isEmpty()) {
auto job = qobject_cast<ProcessDirectoryJob *>(_discoveryPhase->_queuedDeletedDirectories.take(_discoveryPhase->_queuedDeletedDirectories.firstKey()).data());
// qCInfo(lcEngine) << "Permissions of the root folder: " << _csync_ctx->remote.root_perms.toString();
- /*
-
- // Adjust the paths for the renames.
- for (const auto &syncItem : qAsConst(syncItems)) {
- syncItem->_file = adjustRenamedPath(syncItem->_file);
- }
-
ConfigFile cfgFile;
if (!_hasNoneFiles && _hasRemoveFile && cfgFile.promptDeleteFiles()) {
qCInfo(lcEngine) << "All the files are going to be changed, asking the user";
bool cancel = false;
- emit aboutToRemoveAllFiles(syncItems.first()->_direction, &cancel);
+ emit aboutToRemoveAllFiles(_syncItems.first()->_direction, &cancel);
if (cancel) {
qCInfo(lcEngine) << "User aborted sync";
finalize(false);
}
}
+ /*
auto databaseFingerprint = _journal->dataFingerprint();
// If databaseFingerprint is empty, this means that there was no information in the database
// (for example, upgrading from a previous version, or first sync, or server not supporting fingerprint)