Skip to content

Commit

Permalink
fs - go back to previous realpath version & increment version (fix #1…
Browse files Browse the repository at this point in the history
  • Loading branch information
bpasero committed Mar 15, 2021
1 parent fd6f3bc commit ae5684f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "code-oss-dev",
"version": "1.54.2",
"version": "1.54.3",
"distro": "28e2c339381bc0156a513a647044295f0d311d8e",
"author": {
"name": "Microsoft Corporation"
Expand Down
7 changes: 6 additions & 1 deletion src/vs/base/node/extpath.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -52,7 +53,11 @@ export function realcaseSync(path: string): string | null {

export async function realpath(path: string): Promise<string> {
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
Expand Down

0 comments on commit ae5684f

Please sign in to comment.