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

ensure we do not modify a file that has been just uploaded #6297

Merged

Conversation

mgallien
Copy link
Collaborator

No description provided.

Copy link
Collaborator

@allexzander allexzander left a comment

Choose a reason for hiding this comment

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

@mgallien The PR title mentions a file that has been uploaded, but in your code the changes are within if (item->_direction == SyncFileItem::Down) downloaded file, is this correct?

UPDATE: Also, SyncEngineTest has failed

@mgallien
Copy link
Collaborator Author

@mgallien The PR title mentions a file that has been uploaded, but in your code the changes are within if (item->_direction == SyncFileItem::Down) downloaded file, is this correct?

UPDATE: Also, SyncEngineTest has failed

basically the issue is that with group folders, when you upload a file, on the next sync, there will be an update metadata sync step from the server
on this down sync of metadata, we also update the mod time even if it is equal to the one from server
the result on windows is that you will truncate milliseconds from the modtime and will result in software thinking the file was modified

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
@mgallien mgallien force-pushed the bugfix/reallyDoNotModifyUploadedVirtualFilesDuringSync branch from e6aa593 to 0b86924 Compare December 14, 2023 13:41
Copy link

sonarcloud bot commented Dec 14, 2023

Quality Gate Failed Quality Gate failed

Failed conditions

1 New Code Smells (required ≤ 0)
C Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

idea Catch issues before they fail your Quality Gate with our IDE extension SonarLint SonarLint

@nextcloud-desktop-bot
Copy link

AppImage file: nextcloud-PR-6297-0b869247effc59011c4d9ade2ba5412585dc610a-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
Copy link
Collaborator Author

/backport to stable-3.10

@mgallien
Copy link
Collaborator Author

/backport to stable-3.11

@mgallien mgallien merged commit 9b269e9 into master Dec 14, 2023
8 of 11 checks passed
@mgallien mgallien deleted the bugfix/reallyDoNotModifyUploadedVirtualFilesDuringSync branch December 14, 2023 15:12
@mgallien mgallien added this to the 3.12.0 milestone Apr 23, 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
Development

Successfully merging this pull request may close these issues.

None yet

3 participants