diff --git a/packages/io/src/io-util.ts b/packages/io/src/io-util.ts index 7cd42b8f..67bae805 100644 --- a/packages/io/src/io-util.ts +++ b/packages/io/src/io-util.ts @@ -28,8 +28,7 @@ export async function readlink(fsPath: string): Promise { // Only on Windows, ensure directory symlinks end with a backslash if (IS_WINDOWS) { try { - // Use stat on the target to check if it's a directory (result is already resolved) - const stats = await fs.promises.stat(result) + const stats = await fs.promises.lstat(result) if (stats.isDirectory() && !result.endsWith('\\')) { return `${result}\\` }