mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-27 06:45:49 +03:00
Discovery: Remove level of indent around moves
No code changes.
This commit is contained in:
parent
28797baa39
commit
e37e954720
1 changed files with 86 additions and 86 deletions
|
@ -900,7 +900,10 @@ void ProcessDirectoryJob::processFileAnalyzeLocalInfo(
|
||||||
// If it's not a move it's just a local-NEW
|
// If it's not a move it's just a local-NEW
|
||||||
if (!moveCheck()) {
|
if (!moveCheck()) {
|
||||||
postProcessLocalNew();
|
postProcessLocalNew();
|
||||||
} else {
|
finalize();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Check local permission if we are allowed to put move the file here
|
// Check local permission if we are allowed to put move the file here
|
||||||
// Technically we should use the permissions from the server, but we'll assume it is the same
|
// Technically we should use the permissions from the server, but we'll assume it is the same
|
||||||
auto movePerms = checkMovePermissions(base._remotePerm, originalPath, item->isDirectory());
|
auto movePerms = checkMovePermissions(base._remotePerm, originalPath, item->isDirectory());
|
||||||
|
@ -975,9 +978,7 @@ void ProcessDirectoryJob::processFileAnalyzeLocalInfo(
|
||||||
if (base.isVirtualFile() && isVfsWithSuffix())
|
if (base.isVirtualFile() && isVfsWithSuffix())
|
||||||
chopVirtualFileSuffix(serverOriginalPath);
|
chopVirtualFileSuffix(serverOriginalPath);
|
||||||
auto job = new RequestEtagJob(_discoveryData->_account, serverOriginalPath, this);
|
auto job = new RequestEtagJob(_discoveryData->_account, serverOriginalPath, this);
|
||||||
connect(job, &RequestEtagJob::finishedWithResult, this, [=](const HttpResult<QString> &etag) {
|
connect(job, &RequestEtagJob::finishedWithResult, this, [=](const HttpResult<QString> &etag) mutable {
|
||||||
auto tmp_path = path;
|
|
||||||
auto tmp_recurseQueryServer = recurseQueryServer;
|
|
||||||
if (!etag || (*etag != base._etag && !item->isDirectory()) || _discoveryData->isRenamed(originalPath)) {
|
if (!etag || (*etag != base._etag && !item->isDirectory()) || _discoveryData->isRenamed(originalPath)) {
|
||||||
qCInfo(lcDisco) << "Can't rename because the etag has changed or the directory is gone" << originalPath;
|
qCInfo(lcDisco) << "Can't rename because the etag has changed or the directory is gone" << originalPath;
|
||||||
// Can't be a rename, leave it as a new.
|
// Can't be a rename, leave it as a new.
|
||||||
|
@ -985,17 +986,16 @@ void ProcessDirectoryJob::processFileAnalyzeLocalInfo(
|
||||||
} else {
|
} else {
|
||||||
// In case the deleted item was discovered in parallel
|
// In case the deleted item was discovered in parallel
|
||||||
_discoveryData->findAndCancelDeletedJob(originalPath);
|
_discoveryData->findAndCancelDeletedJob(originalPath);
|
||||||
processRename(tmp_path);
|
processRename(path);
|
||||||
tmp_recurseQueryServer = *etag == base._etag ? ParentNotChanged : NormalQuery;
|
recurseQueryServer = *etag == base._etag ? ParentNotChanged : NormalQuery;
|
||||||
}
|
}
|
||||||
processFileFinalize(item, tmp_path, item->isDirectory(), NormalQuery, tmp_recurseQueryServer);
|
processFileFinalize(item, path, item->isDirectory(), NormalQuery, recurseQueryServer);
|
||||||
_pendingAsyncJobs--;
|
_pendingAsyncJobs--;
|
||||||
QTimer::singleShot(0, _discoveryData, &DiscoveryPhase::scheduleMoreJobs);
|
QTimer::singleShot(0, _discoveryData, &DiscoveryPhase::scheduleMoreJobs);
|
||||||
});
|
});
|
||||||
job->start();
|
job->start();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
finalize();
|
finalize();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue