Change default folder in dacpac and schema compare extensions (#5215)

* change default folder in dacpac and schema compare extensions

* move getting rootpath to a method

* change method name
This commit is contained in:
kisantia
2019-04-27 04:27:03 +12:00
committed by GitHub
parent 23f4931a1d
commit 64377000c6
8 changed files with 23 additions and 14 deletions

View File

@@ -208,12 +208,13 @@ export class SchemaCompareDialog {
let currentButton = isTarget ? this.targetFileButton : this.sourceFileButton;
currentButton.onDidClick(async (click) => {
let rootPath = vscode.workspace.rootPath ? vscode.workspace.rootPath : os.homedir();
let fileUris = await vscode.window.showOpenDialog(
{
canSelectFiles: true,
canSelectFolders: false,
canSelectMany: false,
defaultUri: vscode.Uri.file(os.homedir()),
defaultUri: vscode.Uri.file(rootPath),
openLabel: localize('schemaCompare.openFile', 'Open'),
filters: {
'dacpac Files': ['dacpac'],