Skip to content

fix: symlink/junction directories invisible in directory picker and @file #28526

@danielxxomg

Description

@danielxxomg

Description

Symlinked directories (Linux ln -s) and Windows junction points (e.g., OneDrive Desktop) are invisible in the directory picker, @file picker, and file listing. Navigating to ~/OneDrive/Desktop/ shows empty contents.

Root Cause

packages/core/src/filesystem.ts:74 — readDirectoryEntries classifies symlinks and junction points as "symlink" because Node's isDirectory() returns false for reparse points. Downstream filters in src/file/index.ts skip type !== "directory", silently losing all symlink entries.

Steps to Reproduce

  1. On Windows with OneDrive: navigate to ~/OneDrive/Desktop/ in the directory picker → empty
  2. On Linux: ln -s /mnt/data/Projects ~/Projects, navigate → empty
  3. @file picker also doesn't show symlinked directories

Proposed Fix

In readDirectoryEntries, when isSymbolicLink() is true, stat() the target. If the target is a directory, return "directory" instead of "symlink". This fixes ALL consumers (picker, @file, File.list, ripgrep indexer) without changing any downstream filters.

Related Issues

Platform

Windows 11, Linux, macOS (all symlink types)

Terminal

Windows Terminal

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions