Skip to content

fix(windows): Prevent reupload of placeholder dirs deleted remotely - #10576

Merged
mgallien merged 5 commits into
masterfrom
work/vfs-fix-windows
Aug 12, 2026
Merged

fix(windows): Prevent reupload of placeholder dirs deleted remotely#10576
mgallien merged 5 commits into
masterfrom
work/vfs-fix-windows

Conversation

@claucambra

Copy link
Copy Markdown
Collaborator

Summary

There is a bug in which remotely-deleted folders can be reuploaded by the Windows VFS client. This fix detects a virtual directory with no database record and no remote entry and deletes the local entry instead. A normal folder created locally is reported as ItemTypeDirectory, so it still follows the normal upload path.

TODO

  • Test carefully in proper test env

Checklist

AI (if applicable)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Prevents Windows VFS from reuploading stale virtual directories deleted remotely.

Changes:

  • Removes orphaned virtual-directory placeholders.
  • Adds regression coverage for stale placeholders and normal local folders.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/libsync/discovery.cpp Detects and removes stale virtual directories.
test/testsynccfapi.cpp Tests stale-placeholder removal and local-folder upload.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/libsync/discovery.cpp Outdated
@claucambra
claucambra marked this pull request as ready for review August 11, 2026 14:37
claucambra and others added 4 commits August 12, 2026 12:50
…d remotely

Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
@mgallien
mgallien force-pushed the work/vfs-fix-windows branch from 3bd9239 to f797f12 Compare August 12, 2026 10:50
fix test failure by removing expected to fail sync run call

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
@github-actions

Copy link
Copy Markdown
Contributor

Artifact containing the AppImage: nextcloud-appimage-pr-10576.zip

Digest: sha256:dacd2333694af830a0e97a9d8008e5160ea81aa0712578806836bcce47dc9875

To test this change/fix you can download the above artifact file, unzip it, and run it.

Please make sure to quit your existing Nextcloud app and backup your data.

@sonarqubecloud

Copy link
Copy Markdown

@mgallien
mgallien merged commit 97264ad into master Aug 12, 2026
22 of 23 checks passed
@mgallien
mgallien deleted the work/vfs-fix-windows branch August 12, 2026 15:06
@mgallien mgallien modified the milestones: 34.0.2, 35.0.0 Aug 12, 2026
@mgallien

Copy link
Copy Markdown
Collaborator

/backport to stable-34.0 please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants