diff --git a/src/vs/workbench/parts/files/browser/fileActions.ts b/src/vs/workbench/parts/files/browser/fileActions.ts index fbc2f55a0a7c4..fcb3b89e67fd1 100644 --- a/src/vs/workbench/parts/files/browser/fileActions.ts +++ b/src/vs/workbench/parts/files/browser/fileActions.ts @@ -1374,7 +1374,7 @@ export abstract class BaseSaveOneFileAction extends BaseSaveFileAction { source = toResource(this.editorService.getActiveEditorInput(), { supportSideBySide: true }); } - if (source && (this.fileService.canHandleResource(source) || this.untitledEditorService.exists(source))) { + if (source && (this.fileService.canHandleResource(source) || source.scheme === 'untitled')) { // Save As (or Save untitled with associated path) if (this.isSaveAs() || source.scheme === 'untitled') { @@ -1391,7 +1391,7 @@ export abstract class BaseSaveOneFileAction extends BaseSaveFileAction { const editor = getCodeEditor(activeEditor); if (editor) { const activeResource = toResource(activeEditor.input, { supportSideBySide: true }); - if (activeResource && (this.fileService.canHandleResource(activeResource) || this.untitledEditorService.exists(source)) && activeResource.toString() === source.toString()) { + if (activeResource && (this.fileService.canHandleResource(activeResource) || source.scheme === 'untitled') && activeResource.toString() === source.toString()) { viewStateOfSource = editor.saveViewState(); } }