diff --git a/src/sql/workbench/services/queryEditor/browser/queryEditorService.ts b/src/sql/workbench/services/queryEditor/browser/queryEditorService.ts index d078f248c4..7dff133ee9 100644 --- a/src/sql/workbench/services/queryEditor/browser/queryEditorService.ts +++ b/src/sql/workbench/services/queryEditor/browser/queryEditorService.ts @@ -52,7 +52,7 @@ export class QueryEditorService implements IQueryEditorService { let docUri: URI = URI.from({ scheme: Schemas.untitled, path: filePath }); // Create a sql document pane with accoutrements - const fileInput = this._untitledEditorService.create({ associatedResource: docUri, mode: 'sql' }); + const fileInput = this._untitledEditorService.create({ untitledResource: docUri, mode: 'sql' }); let untitledEditorModel = await fileInput.resolve(); if (sqlContent) { untitledEditorModel.textEditorModel.setValue(sqlContent); @@ -87,7 +87,7 @@ export class QueryEditorService implements IQueryEditorService { let docUri: URI = URI.from({ scheme: Schemas.untitled, path: filePath }); // Create a sql document pane with accoutrements - const fileInput = this._untitledEditorService.create({ associatedResource: docUri, mode: 'sql' }); + const fileInput = this._untitledEditorService.create({ untitledResource: docUri, mode: 'sql' }); const m = await fileInput.resolve(); //when associatedResource editor is created it is dirty, this must be set to false to be able to detect changes to the editor. m.setDirty(false); diff --git a/src/vs/workbench/services/textfile/browser/textFileService.ts b/src/vs/workbench/services/textfile/browser/textFileService.ts index 99fd99814d..d78e66ad08 100644 --- a/src/vs/workbench/services/textfile/browser/textFileService.ts +++ b/src/vs/workbench/services/textfile/browser/textFileService.ts @@ -572,7 +572,8 @@ export abstract class AbstractTextFileService extends Disposable implements ITex } // Finally fallback to suggest just the file name - return toLocalResource(resource.with({ path: suggestedFilename }), remoteAuthority); + // {{SQL CARBON EDIT}} - Rationale: this seems to be a bug we picked up from a vscode merge. This should get fixed with a new merge in the future. + return joinPath(this.fileDialogService.defaultFilePath() || URI.file(this.environmentService.userHome), suggestedFilename); } //#endregion