diff --git a/src/git/gitService.ts b/src/git/gitService.ts index 13a0ee05cf3df..3c4b8443d2f17 100644 --- a/src/git/gitService.ts +++ b/src/git/gitService.ts @@ -3051,17 +3051,12 @@ export class GitService implements Disposable { try { const networkPath = await new Promise(resolve => - fs.realpath.native(`${letter}:`, { encoding: 'utf8' }, (err, resolvedPath) => + fs.realpath(`${letter}:`, { encoding: 'utf8' }, (err, resolvedPath) => resolve(err != null ? undefined : resolvedPath), ), ); if (networkPath != null) { - return Strings.normalizePath( - repoUri.fsPath.replace( - networkPath, - `${letter.toLowerCase()}:${networkPath.endsWith('\\') ? '\\' : ''}`, - ), - ); + return networkPath; } } catch {} }