change back to lstat

This commit is contained in:
Salman Muin Kayser Chishti committed 2025-10-15 17:25:34 +01:00
1 parent 2eaa9c1bb6
commit 4337841427
1 file changed
+1 -2
+1 -2
View File
@@ -28,8 +28,7 @@ export async function readlink(fsPath: string): Promise<string> {
// 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}\\`
}