From 43378414278309b959d736acae8ca9c8dac5ef6e Mon Sep 17 00:00:00 2001 From: Salman Muin Kayser Chishti Date: Wed, 15 Oct 2025 17:25:34 +0100 Subject: [PATCH] change back to lstat --- src/io-util.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/io-util.ts b/src/io-util.ts index 7cd42b8..67bae80 100644 --- a/src/io-util.ts +++ b/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}\\` }