File tree Expand file tree Collapse file tree 1 file changed +24
-12
lines changed Expand file tree Collapse file tree 1 file changed +24
-12
lines changed Original file line number Diff line number Diff line change @@ -406,24 +406,36 @@ async function store(state, emitter) {
406406 emitter . emit ( 'render' )
407407
408408 if ( state . isConnected ) {
409- state . boardFiles = await getBoardFiles (
410- serial . getFullPath (
411- state . boardNavigationRoot ,
412- state . boardNavigationPath ,
413- ''
409+ try {
410+ state . boardFiles = await getBoardFiles (
411+ serial . getFullPath (
412+ state . boardNavigationRoot ,
413+ state . boardNavigationPath ,
414+ ''
415+ )
414416 )
415- )
417+ } catch ( e ) {
418+ state . boardFiles = [ ]
419+ }
416420 } else {
417421 state . boardFiles = [ ]
418422 }
419423
420- state . diskFiles = await getDiskFiles (
421- disk . getFullPath (
422- state . diskNavigationRoot ,
423- state . diskNavigationPath ,
424- ''
424+ try {
425+ state . diskFiles = await getDiskFiles (
426+ disk . getFullPath (
427+ state . diskNavigationRoot ,
428+ state . diskNavigationPath ,
429+ ''
430+ )
425431 )
426- )
432+ } catch ( e ) {
433+ state . diskNavigationRoot = null
434+ state . diskNavigationPath = '/'
435+ state . isLoadingFiles = false
436+ emitter . emit ( 'render' )
437+ return
438+ }
427439
428440 emitter . emit ( 'refresh-selected-files' )
429441 state . isLoadingFiles = false
You can’t perform that action at this time.
0 commit comments