зеркало из https://github.com/nextcloud/desktop.git
Discovery: Fix downloading files when database is used for local discovery
This also fix the currently failling LockedFilesTest
This commit is contained in:
Родитель
0eaa950e9e
Коммит
7061f31887
|
@ -281,6 +281,8 @@ void ProcessDirectoryJob::processFile(PathTuple path,
|
|||
auto item = SyncFileItem::fromSyncJournalFileRecord(dbEntry);
|
||||
item->_file = path._target;
|
||||
item->_originalFile = path._original;
|
||||
item->_previousSize = dbEntry._fileSize;
|
||||
item->_previousModtime = dbEntry._modtime;
|
||||
|
||||
// The item shall only have this type if the db request for the virtual download
|
||||
// was successful (like: no conflicting remote remove etc). This decision is done
|
||||
|
@ -331,8 +333,6 @@ void ProcessDirectoryJob::processFileAnalyzeRemoteInfo(
|
|||
item->_remotePerm = serverEntry.remotePerm;
|
||||
item->_type = serverEntry.isDirectory ? ItemTypeDirectory : ItemTypeFile;
|
||||
item->_etag = serverEntry.etag;
|
||||
item->_previousSize = localEntry.size;
|
||||
item->_previousModtime = localEntry.modtime;
|
||||
item->_directDownloadUrl = serverEntry.directDownloadUrl;
|
||||
item->_directDownloadCookies = serverEntry.directDownloadCookies;
|
||||
|
||||
|
@ -676,8 +676,6 @@ void ProcessDirectoryJob::processFileAnalyzeLocalInfo(
|
|||
item->_checksumHeader.clear();
|
||||
item->_size = localEntry.size;
|
||||
item->_modtime = localEntry.modtime;
|
||||
item->_previousSize = dbEntry._fileSize;
|
||||
item->_previousModtime = dbEntry._modtime;
|
||||
_childModified = true;
|
||||
|
||||
// Checksum comparison at this stage is only enabled for .eml files,
|
||||
|
|
|
@ -45,8 +45,9 @@ private slots:
|
|||
fakeFolder.localModifier().insert("A/Y/y2");
|
||||
fakeFolder.localModifier().insert("B/b3");
|
||||
fakeFolder.remoteModifier().insert("C/c3");
|
||||
|
||||
fakeFolder.remoteModifier().appendByte("C/c1");
|
||||
tracker.addTouchedPath("A/X");
|
||||
|
||||
fakeFolder.syncEngine().setLocalDiscoveryOptions(LocalDiscoveryStyle::DatabaseAndFilesystem, tracker.localDiscoveryPaths());
|
||||
|
||||
tracker.startSyncPartialDiscovery();
|
||||
|
|
Загрузка…
Ссылка в новой задаче