File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -632,9 +632,12 @@ export class NativeEditorStorage implements INotebookStorage {
632632 await  this . fileSystem . writeFile ( filePath ,  contents ) ; 
633633 } 
634634 }  else  { 
635-  await  this . fileSystem 
636-  . deleteFile ( filePath ) 
637-  . catch ( ( ex )  =>  traceError ( 'Failed to delete hotExit file. Possible it does not exist' ,  ex ) ) ; 
635+  await  this . fileSystem . deleteFile ( filePath ) . catch ( ( ex )  =>  { 
636+  // No need to log error if file doesn't exist. 
637+  if  ( ! isFileNotFoundError ( ex ) )  { 
638+  traceError ( 'Failed to delete hotExit file. Possible it does not exist' ,  ex ) ; 
639+  } 
640+  } ) ; 
638641 } 
639642 } 
640643 }  catch  ( exc )  { 
Original file line number Diff line number Diff line change @@ -65,7 +65,10 @@ export class NotebookContentProvider implements VSCodeNotebookContentProvider {
6565 metadata : {  cellEditable : false ,  editable : false ,  runnable : false  } 
6666 } ; 
6767 } 
68-  const  model  =  await  this . notebookStorage . load ( uri ,  undefined ,  ! openContext . backupId ) ; 
68+  // If there's no backup id, then skip loading dirty contents. 
69+  const  model  =  await  ( openContext . backupId 
70+  ? this . notebookStorage . load ( uri ,  undefined ,  openContext . backupId ) 
71+  : this . notebookStorage . load ( uri ,  undefined ,  true ) ) ; 
6972 // If experiment is not enabled, then this method was invoked as user opted to try and open using the new API. 
7073 if  ( ! this . useVSCodeNotebookEditorApi )  { 
7174 updateModelForUseWithVSCodeNotebook ( model ) ; 
                         You can’t perform that action at this time. 
           
                  
0 commit comments