Skip to content

resolve shortcuts in file dialogs on Windows - #7374

Merged
kevinushey merged 1 commit into
masterfrom
bugfix/windows-desktop-shortcuts
Jul 17, 2020
Merged

kevinushey merged 1 commit into
masterfrom
bugfix/windows-desktop-shortcuts

Conversation

@kevinushey

Copy link
Copy Markdown
Collaborator

Closes #7327.

Note: this also re-fixes #2476. It looks like this may have regressed as part of a Qt update? The documentation in https://doc.qt.io/qt-5/qfilesystemmodel.html#resolveSymlinks-prop states, surprisingly:

This property holds whether the directory model should resolve symbolic links

This is only relevant on Windows.

By default, this property is true.

Whereas, no such caveat holds for the DontResolveSymlinks flag (https://doc.qt.io/qt-5/qfilesystemmodel.html#Option-enum).

Regardless, it seems like the right solution is to disable resolution of symlinks on non-Windows via the file dialog option.

@gtritchie gtritchie left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM! I assume setOption(QFileDialog::DontResolveSymlinks...) is available in Qt 5.12?

@kevinushey

Copy link
Copy Markdown
Collaborator Author

Indeed it is -- looks like it was available even back in Qt 4.8!

@kevinushey
kevinushey merged commit 4d60fe1 into master Jul 17, 2020
@valerie-rstudio
valerie-rstudio deleted the bugfix/windows-desktop-shortcuts branch January 21, 2022 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't follow windows shortcut (.lnk) RStudio expands symlinks in preferences, breaking on upgrades/changes to target (e.g. git)

2 participants