From 9b8565b0f2421adb5a9ded3c6e2a37b4b52f6146 Mon Sep 17 00:00:00 2001 From: vanhci Date: Thu, 21 May 2026 05:03:22 +0800 Subject: [PATCH] fix(core): treat symlink-to-directory as directory type Symlinked directories (Linux ln -s) and Windows junction points were classified as 'symlink' because Node's isDirectory() returns false for reparse points. The downstream filter in file/index.ts skips entries with type !== 'directory', causing symlinked directories to be invisible in the directory picker and @file picker. Fix: check isDirectory() first for symlinks to determine if the target is a directory, returning 'directory' type instead of 'symlink'. --- packages/core/src/filesystem.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/filesystem.ts b/packages/core/src/filesystem.ts index 8a1cc3a08fc3..154277a54476 100644 --- a/packages/core/src/filesystem.ts +++ b/packages/core/src/filesystem.ts @@ -71,7 +71,7 @@ export namespace AppFileSystem { return entries.map( (e): DirEntry => ({ name: e.name, - type: e.isDirectory() ? "directory" : e.isSymbolicLink() ? "symlink" : e.isFile() ? "file" : "other", + type: e.isSymbolicLink() ? (e.isDirectory() ? "directory" : "symlink") : e.isDirectory() ? "directory" : e.isFile() ? "file" : "other", }), ) },