Skip to content

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

Merged
szaimen merged 1 commit into
masterfrom
bugfix/bring-back-lnk-files
Sep 27, 2022
Merged

Bring back .lnk files on Windows and always treat them as non-virtual files.#4968
szaimen merged 1 commit into
masterfrom
bugfix/bring-back-lnk-files

Conversation

@allexzander

@allexzander allexzander commented Sep 21, 2022

Copy link
Copy Markdown
Contributor

Fix #3244

Signed-off-by: alex-z blackslayer4@gmail.com

@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
Copy Markdown
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

codecov Bot commented Sep 21, 2022

Copy link
Copy Markdown

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
Copy Markdown
Collaborator

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

@tobiasKaminsky

Copy link
Copy Markdown
Member

Sounds promising!

@allexzander allexzander marked this pull request as ready for review September 27, 2022 07:11
… files.

Signed-off-by: alex-z <blackslayer4@gmail.com>
@allexzander

Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown

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
Copy Markdown
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