提交 bf741a1a 编写于 作者: J Joao Moreno

Merge branch 'fix/39738' of https://github.com/pfongkye/vscode into pfongkye-fix/39738

......@@ -328,6 +328,10 @@ export class CommandCenter {
return '';
}
private handlePathTilde(path: string): string {
return path.replace(/^~/, os.homedir());
}
private static cloneId = 0;
@command('git.clone')
......@@ -351,11 +355,10 @@ export class CommandCenter {
const config = workspace.getConfiguration('git');
let value = config.get<string>('defaultCloneDirectory') || os.homedir();
value = value.replace(/^~/, os.homedir());
const parentPath = await window.showInputBox({
prompt: localize('parent', "Parent Directory"),
value,
value: this.handlePathTilde(value),
ignoreFocusOut: true
});
......@@ -379,7 +382,7 @@ export class CommandCenter {
statusBarItem.command = cancelCommandId;
statusBarItem.show();
const clonePromise = this.git.clone(url, parentPath, tokenSource.token);
const clonePromise = this.git.clone(url, this.handlePathTilde(parentPath), tokenSource.token);
try {
window.withProgress({ location: ProgressLocation.SourceControl, title: localize('cloning', "Cloning git repository...") }, () => clonePromise);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册