From 69158eb58bc791b981fa0a2b38ebb6140c35b52a Mon Sep 17 00:00:00 2001 From: Darrien Singleton Date: Wed, 29 May 2019 06:39:12 -0400 Subject: [PATCH] Git clone fix to use character set in regex --- extensions/git/src/git.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/git/src/git.ts b/extensions/git/src/git.ts index ed3e432b773..08001470f33 100644 --- a/extensions/git/src/git.ts +++ b/extensions/git/src/git.ts @@ -338,7 +338,7 @@ export class Git { } async clone(url: string, parentPath: string, cancellationToken?: CancellationToken): Promise { - let baseFolderName = path.win32.basename(decodeURI(url), '.git') || 'repository'; + let baseFolderName = decodeURI(url).replace(/^.*[\/\\]/, '').replace(/\.git$/, '') || 'repository'; let folderName = baseFolderName; let folderPath = path.join(parentPath, folderName); let count = 1;