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

Bring back .lnk files on Windows and always treat them as non-virtual files. #4968

Merged
merged 1 commit into from
Sep 27, 2022

Conversation

allexzander
Copy link
Contributor

@allexzander allexzander commented Sep 21, 2022

Fix #3244

Signed-off-by: alex-z [email protected]

@allexzander allexzander changed the title Bring back .lnk files on Windows and always treat them as non-virtual… Bring back .lnk files on Windows and always treat them as non-virtual files. Sep 21, 2022
@allexzander
Copy link
Contributor Author

@mgallien @tobiasKaminsky One other possible fix for .lnk files on Windows. This PR turns .lnk files to always be treated as normal files instead of placeholders. This allows for avoiding having a VFS hydration freeze.

Two other possible solutions that we have discussed:

  • fix Qt's source code to treat .lnk files on Windows as normal files instead of symlinks
  • implement a wrapper around QFileInfo for Windows and implement methods that QFileInfo has (it turned to be hard as there are a lot of methods, including the very hard to implement permissions() method and we can't guarantee some code will not use QFileInfo methods on a .lnk placeholder.

@codecov
Copy link

codecov bot commented Sep 21, 2022

Codecov Report

Merging #4968 (225c2dd) into master (9f952e3) will increase coverage by 0.12%.
The diff coverage is 60.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4968      +/-   ##
==========================================
+ Coverage   56.98%   57.10%   +0.12%     
==========================================
  Files         138      138              
  Lines       17232    17230       -2     
==========================================
+ Hits         9819     9839      +20     
+ Misses       7413     7391      -22     
Impacted Files Coverage Δ
src/csync/vio/csync_vio_local_win.cpp 81.39% <ø> (-0.43%) ⬇️
src/libsync/vfs/cfapi/vfs_cfapi.cpp 85.77% <33.33%> (+1.82%) ⬆️
src/libsync/discovery.cpp 83.95% <100.00%> (-0.05%) ⬇️
src/libsync/syncengine.cpp 85.56% <0.00%> (+0.53%) ⬆️
src/libsync/vfs/cfapi/cfapiwrapper.cpp 74.42% <0.00%> (+1.82%) ⬆️
src/libsync/vfs/cfapi/hydrationjob.cpp 56.08% <0.00%> (+3.70%) ⬆️

@mgallien
Copy link
Collaborator

this solution looks interesting.
I am going to test it in the next days

@tobiasKaminsky
Copy link
Member

Sounds promising!

@allexzander allexzander marked this pull request as ready for review September 27, 2022 07:11
@allexzander
Copy link
Contributor Author

this solution looks interesting. I am going to test it in the next days

I have tested it with different scenarios. Seems to be working.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@nextcloud-desktop-bot
Copy link

AppImage file: nextcloud-PR-4968-225c2dda4c3fe57c24abccb3616bd2614fc812ec-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.

@szaimen szaimen merged commit 1f5ce39 into master Sep 27, 2022
@szaimen szaimen deleted the bugfix/bring-back-lnk-files branch September 27, 2022 14:42
@allexzander
Copy link
Contributor Author

/backport to stable-3.6

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.

[3.2.1 regression] Shortcut .lnk files cannot be synced anymore
6 participants