change back to lstat
This commit is contained in:
@@ -28,8 +28,7 @@ export async function readlink(fsPath: string): Promise<string> {
|
|||||||
// Only on Windows, ensure directory symlinks end with a backslash
|
// Only on Windows, ensure directory symlinks end with a backslash
|
||||||
if (IS_WINDOWS) {
|
if (IS_WINDOWS) {
|
||||||
try {
|
try {
|
||||||
// Use stat on the target to check if it's a directory (result is already resolved)
|
const stats = await fs.promises.lstat(result)
|
||||||
const stats = await fs.promises.stat(result)
|
|
||||||
if (stats.isDirectory() && !result.endsWith('\\')) {
|
if (stats.isDirectory() && !result.endsWith('\\')) {
|
||||||
return `${result}\\`
|
return `${result}\\`
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user