Added notification for unsaved file in scheduling (#7705)

* Added notification for unsaved file in scheduling

* Removed logging message in line 216

* Changed regex for all 3 platforms (forbid '/')

* Untitled file prompts to save in mainController

* removed spaces and changed save message
This commit is contained in:
Alex Ma
2019-10-15 14:29:34 -07:00
committed by GitHub
parent b6ef5469de
commit e74538b40d

View File

@@ -169,8 +169,8 @@ export class MainController {
if (!ownerUri || ownerUri instanceof vscode.Uri) {
let path: string;
if (!ownerUri) {
if (azdata.nb.activeNotebookEditor.document.isDirty) {
vscode.window.showErrorMessage(localize('agent.unsavedFileSchedulingError', 'Save file before scheduling'), { modal: true });
if (azdata.nb.activeNotebookEditor.document.isDirty || azdata.nb.activeNotebookEditor.document.isUntitled) {
vscode.window.showErrorMessage(localize('agent.unsavedFileSchedulingError', 'The notebook must be saved before being scheduled. Please save and then retry scheduling again.'), { modal: true });
return;
}
path = azdata.nb.activeNotebookEditor.document.fileName;