Skip to content

[Bug]: SSH project picker shows symlinked directories as non-selectable files #29490

Closed

Description

@quzard

Operating system

macOS

Orca version

latest main (cfca220)

Details

Short summary:
When adding a project on an SSH host (POSIX), the remote directory picker lists a symlink that points to a directory as a plain file, so it cannot be opened or selected. Many servers keep workspaces behind symlinks (e.g. /home/user/wt -> /data/wt), which makes those directories unreachable from the picker.

Root cause (current main):

  • Direct SSH browse: src/main/ssh/ssh-remote-directory-browse.ts runs command ls -1Ap. -p only appends / to real directories, not to symlinks to directories, so the parser marks them isDirectory: false.
  • Managed server browse: src/main/runtime/runtime-server-environment-commands.ts uses Dirent.isDirectory(), which does not follow symlinks.

Steps to reproduce:

  1. On a Linux SSH host: mkdir -p ~/real/project && ln -s ~/real ~/linked
  2. In Orca, Add project -> choose the SSH host -> browse to ~.
  3. linked appears as a file and cannot be entered/selected.

Expected behavior:
A symlink whose target is a directory is shown and navigable as a folder. Dangling symlinks stay non-selectable and do not break the listing.

Proposed approach:

  • Managed server path: for entries where isSymbolicLink() is true, stat() the entry and mark it a directory only if the target is a directory; treat stat errors as files.
  • Direct SSH path: make the POSIX list command mark symlinks-to-directories with a trailing slash, keeping the output format unchanged.
  • Add unit tests for symlink to dir, symlink to file, and dangling symlink.

Environment: client macOS, remote Linux over SSH.

I have a working patch for this in a fork and am happy to send a PR once the approach is confirmed.

Activity

  1. added theissue type on Oct 16, 2026
  2. nwparker commented on Oct 16, 2026

    @nwparker
    Contributor

    Fix is in #29658: on SSH and managed hosts, a symlink to a folder is now listed and opens as a folder, and broken links and loops stay files without breaking the listing. Verified live on a Linux host. This issue will close when that PR merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingos:macosIssues affecting macOS

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions