Fixing folder path in dacpac and schema compare extensions (#7352)

* fixing folder path in dacpac and schema compare extensions

* created method

* import os
This commit is contained in:
Kim Santiago
2019-09-25 15:00:56 -07:00
committed by GitHub
parent f7c468d6f0
commit e3c347e148
4 changed files with 14 additions and 6 deletions

View File

@@ -6,6 +6,7 @@
import * as azdata from 'azdata';
import * as vscode from 'vscode';
import * as mssql from '../../mssql';
import * as os from 'os';
export interface IPackageInfo {
name: string;
@@ -85,3 +86,10 @@ export async function verifyConnectionAndGetOwnerUri(endpoint: mssql.SchemaCompa
}
return undefined;
}
/**
* Returns the folder open in Explorer if there is one, otherwise returns the home directory
*/
export function getRootPath(): string {
return vscode.workspace.workspaceFolders ? vscode.workspace.workspaceFolders[0].uri.fsPath : os.homedir();
}