Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable-3.13] Allow deletion of virtual suffix placeholder files #6856

Merged
merged 4 commits into from
Jun 28, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Amend behaviour of suffix virtual files test to reflect new expected …
…behaviour

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
  • Loading branch information
claucambra authored and backportbot[bot] committed Jun 28, 2024
commit df5b94c4319afa9285fc69b0186f53830198da68
9 changes: 3 additions & 6 deletions test/testsyncvirtualfiles.cpp
Original file line number Diff line number Diff line change
@@ -167,17 +167,14 @@ private slots:
QCOMPARE(dbRecord(fakeFolder, "A/a1" DVSUFFIX)._fileSize, 65);
cleanup();

// If the local virtual file file is removed, it'll just be recreated
// If the local virtual file is removed, it should be gone remotely too
if (!doLocalDiscovery)
fakeFolder.syncEngine().setLocalDiscoveryOptions(LocalDiscoveryStyle::DatabaseAndFilesystem, { "A" });
fakeFolder.localModifier().remove("A/a1" DVSUFFIX);
QVERIFY(fakeFolder.syncOnce());
QVERIFY(!fakeFolder.currentLocalState().find("A/a1"));
QVERIFY(fakeFolder.currentLocalState().find("A/a1" DVSUFFIX));
QVERIFY(fakeFolder.currentRemoteState().find("A/a1"));
QVERIFY(itemInstruction(completeSpy, "A/a1" DVSUFFIX, CSYNC_INSTRUCTION_NEW));
QCOMPARE(dbRecord(fakeFolder, "A/a1" DVSUFFIX)._type, ItemTypeVirtualFile);
QCOMPARE(dbRecord(fakeFolder, "A/a1" DVSUFFIX)._fileSize, 65);
QVERIFY(!fakeFolder.currentLocalState().find("A/a1" DVSUFFIX));
QVERIFY(!fakeFolder.currentRemoteState().find("A/a1"));
cleanup();

// Remote rename is propagated