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

when moving a file, checks that it exists at origin or destination #6463

Merged
merged 3 commits into from
Mar 5, 2024

Conversation

mgallien
Copy link
Collaborator

@mgallien mgallien commented Feb 19, 2024

Prevent double MOVE instructions for a single file by fixing one place that forgot to track such MOVE instructions

add an automated test to reproduce teh error scenario

add a fix for the wrong behavior

to prevent the issue from coming back also add an assert ensuring a moved file exists

Close #6462

@mgallien mgallien force-pushed the bugfix/multipleMovesOfASingleFileid branch 2 times, most recently from 92f3fc4 to 7a7926e Compare March 5, 2024 11:17
@mgallien mgallien marked this pull request as ready for review March 5, 2024 11:17
@mgallien
Copy link
Collaborator Author

mgallien commented Mar 5, 2024

/backport to stable-3.12

mgallien added 2 commits March 5, 2024 14:43
current automated tests are never breaking the rule that a file that
should be moved on client side (after a move was done server side)
exists either at teh original path or the destination path.

in practice it may happen (and I manually tested it) thet the sync
engine decides to move a single file in two distinct places

that decision will violate this rule and a debug build would then run
into the assert

Close #6462

Signed-off-by: Matthieu Gallien <[email protected]>
this new test trigger the assert that a file is either in the old place
or the new place when we execute a MOVE instruction for a local file

in the test one file is discovered as in need of a local MOVE but will
be missing from the old and new places when running the propagation due
to a bug

Signed-off-by: Matthieu Gallien <[email protected]>
@mgallien mgallien force-pushed the bugfix/multipleMovesOfASingleFileid branch from 7a7926e to 8f8646f Compare March 5, 2024 13:43
@mgallien mgallien requested a review from allexzander March 5, 2024 15:41
will fix mishandling of rename of a single file to multiple places
during discovery

Signed-off-by: Matthieu Gallien <[email protected]>
@mgallien mgallien force-pushed the bugfix/multipleMovesOfASingleFileid branch from 8f8646f to b7c1a95 Compare March 5, 2024 15:43
@nextcloud-desktop-bot
Copy link

AppImage file: nextcloud-PR-6463-b7c1a95d1cb3ba7800e79f8272d065eb674e9f54-x86_64.AppImage

To test this change/fix you can simply download above AppImage file and test it.

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

@mgallien mgallien merged commit 903e313 into master Mar 5, 2024
10 of 12 checks passed
@mgallien mgallien deleted the bugfix/multipleMovesOfASingleFileid branch March 5, 2024 16:19
Copy link

sonarqubecloud bot commented Mar 5, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@mgallien mgallien added this to the 3.13.0 milestone Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants