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

Use 'FindMimeFromData' from Win API instead of QMimeDatabase() functions to get the mimetype. Prevents freeze from VFS placeholders. #6458

Merged
merged 1 commit into from
Feb 22, 2024

Conversation

allexzander
Copy link
Contributor

Similar, to how we had an issue with .lnk files (https://doc.qt.io/qt-6/qfileinfo.html#symbolic-links-and-shortcuts) on Windows with VFS mode on, we now have a freeze when trying to get mime-type for a non-hydrated(online-only) file in CaseClash conflict resolution dialog. This PR switches to using a Windows API-specific function to get the mime-type (same result as with QMimeDatabase() but without causing a freeze on placeholder files).

@allexzander
Copy link
Contributor Author

/backport to stable-3.12

@allexzander allexzander force-pushed the bugfix/caseclashconflict-dialog-vfsmode-freeze branch 2 times, most recently from d56765e to 8276351 Compare February 17, 2024 20:26
src/gui/caseclashfilenamedialog.cpp Outdated Show resolved Hide resolved
@allexzander allexzander force-pushed the bugfix/caseclashconflict-dialog-vfsmode-freeze branch from 9a432f7 to a87f067 Compare February 22, 2024 00:05
@allexzander allexzander requested a review from mgallien February 22, 2024 00:05
@allexzander
Copy link
Contributor Author

@mgallien it works, fixed, also, the other change is needed, because we end up having paths with double '/'

…ze from VFS placeholders.

Signed-off-by: alex-z <blackslayer4@gmail.com>
@mgallien mgallien force-pushed the bugfix/caseclashconflict-dialog-vfsmode-freeze branch from a87f067 to 8aaa0d4 Compare February 22, 2024 09:18
Copy link

sonarcloud bot commented Feb 22, 2024

@nextcloud-desktop-bot
Copy link

AppImage file: nextcloud-PR-6458-8aaa0d4c135f5a78cb57436a96c55d6b40fd58f3-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.

@allexzander allexzander merged commit 0364cd2 into master Feb 22, 2024
11 of 13 checks passed
@allexzander allexzander deleted the bugfix/caseclashconflict-dialog-vfsmode-freeze branch February 22, 2024 11:37
@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
Development

Successfully merging this pull request may close these issues.

3 participants