update io utils

This commit is contained in:
Salman Muin Kayser Chishti
2025-10-15 16:28:21 +01:00
parent 625c3f4856
commit 9a364e607b
3 changed files with 5 additions and 4 deletions
+2 -1
View File
@@ -28,7 +28,8 @@ export async function readlink(fsPath: string): Promise<string> {
// Only on Windows, ensure directory symlinks end with a backslash
if (IS_WINDOWS) {
try {
const stats = await fs.promises.lstat(result)
// Use stat on the target to check if it's a directory (result is already resolved)
const stats = await fs.promises.stat(result)
if (stats.isDirectory() && !result.endsWith('\\')) {
return `${result}\\`
}