mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-14 17:22:20 -05:00
Fix export results default save location (#18224)
* Fix export results default save location * cleanup
This commit is contained in:
@@ -9,14 +9,12 @@ import { URI } from 'vs/base/common/uri';
|
||||
import { IWorkspaceContextService, WorkbenchState } from 'vs/platform/workspace/common/workspace';
|
||||
import { Schemas } from 'vs/base/common/network';
|
||||
|
||||
export const FILE_SCHEMA: string = 'file';
|
||||
|
||||
export function resolveCurrentDirectory(uri: string, rootPath?: string): string | undefined {
|
||||
let sqlUri = URI.parse(uri);
|
||||
let currentDirectory: string | undefined;
|
||||
|
||||
// use current directory of the sql file if sql file is saved
|
||||
if (sqlUri.scheme === FILE_SCHEMA) {
|
||||
if (sqlUri.scheme === Schemas.file) {
|
||||
currentDirectory = dirname(sqlUri.fsPath);
|
||||
} else if (sqlUri.scheme === Schemas.untitled) {
|
||||
// if sql file is unsaved/untitled but a workspace is open use workspace root
|
||||
|
||||
Reference in New Issue
Block a user