mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
use previous file location if there was one (#6625)
This commit is contained in:
@@ -164,8 +164,12 @@ export abstract class DacFxConfigPage extends BasePage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected getRootPath(): string {
|
protected getRootPath(): string {
|
||||||
// return rootpath of opened folder in file explorer if one is open, otherwise default to user home directory
|
// use previous file location if there was one
|
||||||
return vscode.workspace.rootPath ? vscode.workspace.rootPath : os.homedir();
|
if (this.fileTextBox.value && path.dirname(this.fileTextBox.value)) {
|
||||||
|
return path.dirname(this.fileTextBox.value);
|
||||||
|
} else { // otherwise use the folder open in the Explorer or the home directory
|
||||||
|
return vscode.workspace.rootPath ? vscode.workspace.rootPath : os.homedir();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected appendFileExtensionIfNeeded() {
|
protected appendFileExtensionIfNeeded() {
|
||||||
|
|||||||
Reference in New Issue
Block a user