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 (!moveCheck()) {
|
||||
postProcessLocalNew();
|
||||
} else {
|
||||
finalize();
|
||||
return;
|
||||
}
|
||||
|
||||
// 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
|
||||
auto movePerms = checkMovePermissions(base._remotePerm, originalPath, item->isDirectory());
|
||||
|
@ -975,9 +978,7 @@ void ProcessDirectoryJob::processFileAnalyzeLocalInfo(
|
|||
if (base.isVirtualFile() && isVfsWithSuffix())
|
||||
chopVirtualFileSuffix(serverOriginalPath);
|
||||
auto job = new RequestEtagJob(_discoveryData->_account, serverOriginalPath, this);
|
||||
connect(job, &RequestEtagJob::finishedWithResult, this, [=](const HttpResult<QString> &etag) {
|
||||
auto tmp_path = path;
|
||||
auto tmp_recurseQueryServer = recurseQueryServer;
|
||||
connect(job, &RequestEtagJob::finishedWithResult, this, [=](const HttpResult<QString> &etag) mutable {
|
||||
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;
|
||||
// Can't be a rename, leave it as a new.
|
||||
|
@ -985,17 +986,16 @@ void ProcessDirectoryJob::processFileAnalyzeLocalInfo(
|
|||
} else {
|
||||
// In case the deleted item was discovered in parallel
|
||||
_discoveryData->findAndCancelDeletedJob(originalPath);
|
||||
processRename(tmp_path);
|
||||
tmp_recurseQueryServer = *etag == base._etag ? ParentNotChanged : NormalQuery;
|
||||
processRename(path);
|
||||
recurseQueryServer = *etag == base._etag ? ParentNotChanged : NormalQuery;
|
||||
}
|
||||
processFileFinalize(item, tmp_path, item->isDirectory(), NormalQuery, tmp_recurseQueryServer);
|
||||
processFileFinalize(item, path, item->isDirectory(), NormalQuery, recurseQueryServer);
|
||||
_pendingAsyncJobs--;
|
||||
QTimer::singleShot(0, _discoveryData, &DiscoveryPhase::scheduleMoreJobs);
|
||||
});
|
||||
job->start();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
finalize();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue