Git clone fix to use character set in regex

This commit is contained in:
Darrien Singleton
2019-05-29 06:39:12 -04:00
parent 0bf7825bc2
commit 69158eb58b

View File

@@ -338,7 +338,7 @@ export class Git {
}
async clone(url: string, parentPath: string, cancellationToken?: CancellationToken): Promise<string> {
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;