mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-22 04:55:48 +03:00
Vfs: Make dehydration a SYNC and not a NEW action
That change will be useful for the notifications. Previously the dehydrated files were reported as "newly downloaded", now they're reported as "updated".
This commit is contained in:
parent
797734870f
commit
f24687ec93
2 changed files with 5 additions and 3 deletions
|
@ -642,7 +642,7 @@ void ProcessDirectoryJob::processFileAnalyzeLocalInfo(
|
|||
} else if (dbEntry._type == ItemTypeVirtualFileDehydration) {
|
||||
// dehydration requested
|
||||
item->_direction = SyncFileItem::Down;
|
||||
item->_instruction = CSYNC_INSTRUCTION_NEW;
|
||||
item->_instruction = CSYNC_INSTRUCTION_SYNC;
|
||||
item->_type = ItemTypeVirtualFileDehydration;
|
||||
}
|
||||
} else if (noServerEntry) {
|
||||
|
@ -707,7 +707,7 @@ void ProcessDirectoryJob::processFileAnalyzeLocalInfo(
|
|||
item->_direction = SyncFileItem::Down;
|
||||
} else if (dbEntry._type == ItemTypeVirtualFileDehydration || localEntry.type == ItemTypeVirtualFileDehydration) {
|
||||
item->_direction = SyncFileItem::Down;
|
||||
item->_instruction = CSYNC_INSTRUCTION_NEW;
|
||||
item->_instruction = CSYNC_INSTRUCTION_SYNC;
|
||||
item->_type = ItemTypeVirtualFileDehydration;
|
||||
} else if (!serverModified && dbEntry._inode != localEntry.inode) {
|
||||
item->_instruction = CSYNC_INSTRUCTION_UPDATE_METADATA;
|
||||
|
@ -970,7 +970,7 @@ void ProcessDirectoryJob::processFileFinalize(
|
|||
addVirtualFileSuffix(item->_file);
|
||||
}
|
||||
if (item->_type == ItemTypeVirtualFileDehydration
|
||||
&& item->_instruction == CSYNC_INSTRUCTION_NEW) {
|
||||
&& item->_instruction == CSYNC_INSTRUCTION_SYNC) {
|
||||
item->_renameTarget = item->_file;
|
||||
addVirtualFileSuffix(item->_renameTarget);
|
||||
}
|
||||
|
|
|
@ -677,8 +677,10 @@ private slots:
|
|||
|
||||
QVERIFY(isDehydrated("A/a1"));
|
||||
QVERIFY(hasDehydratedDbEntries("A/a1"));
|
||||
QVERIFY(itemInstruction(completeSpy, "A/a1.nextcloud", CSYNC_INSTRUCTION_SYNC));
|
||||
QVERIFY(isDehydrated("A/a2"));
|
||||
QVERIFY(hasDehydratedDbEntries("A/a2"));
|
||||
QVERIFY(itemInstruction(completeSpy, "A/a2.nextcloud", CSYNC_INSTRUCTION_SYNC));
|
||||
|
||||
QVERIFY(!fakeFolder.currentLocalState().find("B/b1"));
|
||||
QVERIFY(!fakeFolder.currentRemoteState().find("B/b1"));
|
||||
|
|
Loading…
Reference in a new issue