From ff915844119ce9485abfe8aa9076ec76b5300ddd Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Fri, 10 Apr 2020 15:14:14 -0400 Subject: [PATCH] Fixes #94882 -- checks for trailing \ & protects if somehow `networkPath` had a trailing \, it would cause this behavior --- extensions/git/src/git.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/extensions/git/src/git.ts b/extensions/git/src/git.ts index 851036b15f47c..f3de788998f09 100644 --- a/extensions/git/src/git.ts +++ b/extensions/git/src/git.ts @@ -443,7 +443,10 @@ export class Git { ); if (networkPath !== undefined) { return path.normalize( - repoUri.fsPath.replace(networkPath, `${letter.toLowerCase()}:`), + repoUri.fsPath.replace( + networkPath, + `${letter.toLowerCase()}:${networkPath.endsWith('\\') ? '\\' : ''}` + ), ); } } catch { }