725
}
726
727
>
async function realpath(path: string): Promise<string> {
pfs.ts
728
>
try {
729
>
// DO NOT USE `fs.promises.realpath` here as it internally
730
>
// calls `fs.native.realpath` which will result in subst
731
>
// drives to be resolved to their target on Windows
732
>
// https://github.com/microsoft/vscode/issues/118562
733
>
return await promisify(fs.realpath)(path);
734
>
} catch {
735
736
// We hit an error calling fs.realpath(). Since fs.realpath() is doing some path normalization