diff --git a/package.json b/package.json index 55b4ef2cec06c..d298ee3603911 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "code-oss-dev", - "version": "1.54.2", + "version": "1.54.3", "distro": "28e2c339381bc0156a513a647044295f0d311d8e", "author": { "name": "Microsoft Corporation" diff --git a/src/vs/base/node/extpath.ts b/src/vs/base/node/extpath.ts index b43c407d519a8..eaf62cd8e1251 100644 --- a/src/vs/base/node/extpath.ts +++ b/src/vs/base/node/extpath.ts @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import * as fs from 'fs'; +import { promisify } from 'util'; import { rtrim } from 'vs/base/common/strings'; import { sep, join, normalize, dirname, basename } from 'vs/base/common/path'; import { readdirSync } from 'vs/base/node/pfs'; @@ -52,7 +53,11 @@ export function realcaseSync(path: string): string | null { export async function realpath(path: string): Promise { try { - return await fs.promises.realpath(path); + // DO NOT USE `fs.promises.realpath` here as it internally + // calls `fs.native.realpath` which will result in subst + // drives to be resolved to their target on Windows + // https://github.com/microsoft/vscode/issues/118562 + return await promisify(fs.realpath)(path); } catch (error) { // We hit an error calling fs.realpath(). Since fs.realpath() is doing some path normalization