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

Convert VFS file to placeholder again if needed #5889

Merged
merged 3 commits into from
Jul 26, 2023

Conversation

m7913d
Copy link
Contributor

@m7913d m7913d commented Jul 15, 2023

Note that Windows may convert a placeholder file to a regular file when it is replaced by another file, even if the old and new file (inode, modified time, file size) are identical.

Steps to reproduce the the issue:

  • Create file "a"
  • Create folder "A"
  • Copy file "a" to "A"
  • Let the client sync the local changes to the server.
  • Copy file "a" again to "A" (and let Windows replace the file)
  • "A/a" will indefinitely show the syncing icon.

Copy link
Collaborator

@mgallien mgallien left a comment

Choose a reason for hiding this comment

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

thanks
see my comments

src/csync/csync.h Show resolved Hide resolved
test/testsynccfapi.cpp Outdated Show resolved Hide resolved
src/libsync/vfs/cfapi/cfapiwrapper.cpp Outdated Show resolved Hide resolved
@mgallien
Copy link
Collaborator

/backport to stable-3.9

@codecov
Copy link

codecov bot commented Jul 24, 2023

Codecov Report

Merging #5889 (52906d8) into master (c501310) will decrease coverage by 0.06%.
The diff coverage is 41.66%.

❗ Current head 52906d8 differs from pull request most recent head 243fcfe. Consider uploading reports for the commit 243fcfe to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5889      +/-   ##
==========================================
- Coverage   60.08%   60.03%   -0.06%     
==========================================
  Files         145      145              
  Lines       18762    18771       +9     
==========================================
- Hits        11273    11269       -4     
- Misses       7489     7502      +13     
Files Changed Coverage Δ
src/libsync/discovery.cpp 86.32% <ø> (ø)
src/libsync/discoveryphase.h 20.00% <ø> (ø)
src/libsync/vfs/cfapi/cfapiwrapper.cpp 71.68% <0.00%> (-1.13%) ⬇️
src/libsync/vfs/cfapi/cfapiwrapper.h 0.00% <ø> (ø)
src/csync/csync.h 75.00% <100.00%> (ø)
src/libsync/discoveryphase.cpp 79.34% <100.00%> (+0.05%) ⬆️
src/libsync/vfs/cfapi/vfs_cfapi.cpp 82.50% <100.00%> (+0.06%) ⬆️

... and 1 file with indirect coverage changes

@m7913d m7913d requested a review from allexzander July 25, 2023 12:18
Note that Windows may convert a placeholder file to a regular file when
it is replaced by another file, even if the old and new file (inode,
modified time, file size) are identical.

WIN32_FIND_DATA::dwReserved0 is only initialised in case of
FILE_ATTRIBUTE_REPARSE_POINT is set. This field is not a bit set. Check
corrected to only include all cloud reparse points and not other special
reparse points.

Signed-off-by: Dries Mys <[email protected]>
@nextcloud-desktop-bot
Copy link

AppImage file: nextcloud-PR-5889-243fcfedb92b56b69d8272108cb7366fca18a1be-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 16eaa35 into nextcloud:master Jul 26, 2023
6 of 8 checks passed
@mgallien mgallien added this to the 3.10.0 milestone Sep 7, 2023
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.

4 participants