File tree Expand file tree Collapse file tree
libs/vscode/notebooks/src/lib/controller Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ import {
1717 IDL_LANGUAGE_NAME ,
1818 IDL_NOTEBOOK_CONTROLLER_NAME ,
1919 IDL_NOTEBOOK_LANGUAGE_NAME ,
20+ IDLFileHelper ,
2021 Sleep ,
2122} from '@idl/shared' ;
2223import { IDL_TRANSLATION } from '@idl/translation' ;
@@ -730,16 +731,19 @@ export class IDLNotebookController {
730731 // reset cell output
731732 execution . clearOutput ( ) ;
732733
733- /** Folder where we write notebook cell */
734+ /** Folder where we write notebook cell, check if NB is saved to disk */
734735 const nbDir =
735736 cell . notebook . uri . scheme === 'file'
736737 ? dirname ( CleanPath ( cell . notebook . uri . fsPath ) )
737738 : NOTEBOOK_FOLDER ;
738739
739740 /**
740- * temp folder for notebook cell
741+ * PRO file for where we write the NB cell to disk
741742 */
742- const fsPath = join ( nbDir , 'notebook_cell.pro' ) ;
743+ const fsPath =
744+ cell . notebook . uri . scheme === 'file'
745+ ? IDLFileHelper . notebookCellUriToFSPath ( cell . document . uri )
746+ : join ( nbDir , 'notebook_cell.pro' ) ;
743747
744748 // make our folder if it doesnt exist
745749 if ( ! existsSync ( nbDir ) ) {
You can’t perform that action at this time.
0 commit comments