change back to lstat

This commit is contained in:
Salman Muin Kayser Chishti
2025-10-15 17:25:34 +01:00
parent b319d6afff
commit ae3ac0db0c
+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}\\`
}