Skip to content

Commit 2b9aebd

Browse files
authored
fs - go back to previous realpath version & increment version (fix #118562) (#118956)
1 parent fd6f3bc commit 2b9aebd

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "code-oss-dev",
3-
"version": "1.54.2",
3+
"version": "1.54.3",
44
"distro": "28e2c339381bc0156a513a647044295f0d311d8e",
55
"author": {
66
"name": "Microsoft Corporation"

src/vs/base/node/extpath.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
*--------------------------------------------------------------------------------------------*/
55

66
import * as fs from 'fs';
7+
import { promisify } from 'util';
78
import { rtrim } from 'vs/base/common/strings';
89
import { sep, join, normalize, dirname, basename } from 'vs/base/common/path';
910
import { readdirSync } from 'vs/base/node/pfs';
@@ -52,7 +53,11 @@ export function realcaseSync(path: string): string | null {
5253

5354
export async function realpath(path: string): Promise<string> {
5455
try {
55-
return await fs.promises.realpath(path);
56+
// DO NOT USE `fs.promises.realpath` here as it internally
57+
// calls `fs.native.realpath` which will result in subst
58+
// drives to be resolved to their target on Windows
59+
// https://github.com/microsoft/vscode/issues/118562
60+
return await promisify(fs.realpath)(path);
5661
} catch (error) {
5762

5863
// We hit an error calling fs.realpath(). Since fs.realpath() is doing some path normalization

0 commit comments

Comments
 (0)