Git clone fix to use basename

This commit is contained in:
OneThatWalks
2018-10-17 00:30:39 -04:00
parent 799bc78af5
commit e002fc6afa

View File

@@ -334,7 +334,7 @@ export class Git {
}
async clone(url: string, parentPath: string, cancellationToken?: CancellationToken): Promise<string> {
let baseFolderName = decodeURI(url).replace(/^.*\//, '').replace(/\.git$/, '') || 'repository';
let baseFolderName = path.win32.basename(decodeURI(url), '.git') || 'repository';
let folderName = baseFolderName;
let folderPath = path.join(parentPath, folderName);
let count = 1;