Skip to content

fix(cfapi): avoid creation of db records if CfExecute failed - #9912

Merged
nilsding merged 2 commits into
masterfrom
bugfix/9858/win32-random-deletions
Apr 27, 2026
Merged

fix(cfapi): avoid creation of db records if CfExecute failed #9912
nilsding merged 2 commits into
masterfrom
bugfix/9858/win32-random-deletions

Conversation

@nilsding

@nilsding nilsding commented Apr 27, 2026

Copy link
Copy Markdown
Member

when the call to CfExecute fails (e.g. due to "The cloud operation was canceled by user.") consider all new placeholders as invalid.
VfsCfApi::finalizeNewPlaceholders won't create a new metadata record for new, errored items which would cause random deletions in a future sync due to the combination of {db: exists, local: absent, remote: exists} => (placeholder) item was apparently removed locally; even though only the creation of the item failed ...

should help with #8983, #9858

@nilsding

Copy link
Copy Markdown
Member Author

/backport to stable-33.0 please

when the call to CfExecute fails (e.g. due to "The cloud operation was
canceled by user.") consider all new placeholders as invalid.
VfsCfApi::finalizeNewPlaceholders won't create a new metadata record for
new, errored items which would cause random deletions in a future sync due
to the combination of {db: exists, local: absent, remote: exists}
=> (placeholder) item was apparently removed locally; even though only the
creation of the item failed ...

Signed-off-by: Jyrki Gadinger <[email protected]>
@nilsding
nilsding force-pushed the bugfix/9858/win32-random-deletions branch from 0689bdc to ba534c6 Compare April 27, 2026 08:41
@github-actions

Copy link
Copy Markdown
Contributor

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

Digest: sha256:7b46cfe244c7f8938046943a760492439cc6d0d90d335393bb771ff2d5e16aa7

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.

@nilsding
nilsding marked this pull request as ready for review April 27, 2026 09:11
@nilsding
nilsding merged commit 672ba0d into master Apr 27, 2026
22 of 23 checks passed
@nilsding
nilsding deleted the bugfix/9858/win32-random-deletions branch April 27, 2026 09:37
@nilsding nilsding modified the milestones: 33.0.3, 34.0.0 Apr 27, 2026
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
E Maintainability Rating on New Code (required ≥ A)
72 New Code Smells (required ≤ 0)
E Reliability Rating on New Code (required ≥ A)
1 New Bugs (required ≤ 0)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@nilsding

Copy link
Copy Markdown
Member Author

/backport to stable-4.0

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

Projects

None yet

2 participants