Skip to content

Files pane: follow Windows .lnk shortcuts and show a link indicator #18274

Description

@gtritchie

Problem

On Windows, the Files pane treats .lnk shortcuts as opaque files:

  • Clicking a shortcut to a folder shows an error instead of navigating into the folder.
  • Clicking a shortcut to a file opens the .lnk file's binary contents in the editor instead of the document it points to.
  • Nothing distinguishes a shortcut row from a regular file.

Earlier reports of this: #7327 and #8514. This had been fixed in the Qt version of RStudio but broke again when we switched to Electron.

Proposal

Bring Windows shortcuts to parity with the recently added macOS Finder alias support (#18158) and the link indicator (#9924):

  • Resolve .lnk shortcuts during Files pane listings: clicking a shortcut to a folder navigates to that folder; clicking (or using Open on) a shortcut to a file opens the target file. File open dialogs and target-based file-type icons follow the target as well.
  • Show the link indicator badge on shortcut rows (as symbolic links and Finder aliases get), labeled "Shortcut", with a name -> target tooltip.
  • Broken shortcuts (target deleted) and shortcuts without a file-system target (e.g. Control Panel applets) keep the badge but otherwise behave as plain files.
  • Resolution must not hit the disk, network, or show UI during listings (no IShellLink::Resolve); network targets are never probed, so a disconnected share cannot stall the session.

Metadata

Metadata

Assignees

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions