File tree 1 file changed +24
-12
lines changed
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) {
406
406
emitter . emit ( 'render' )
407
407
408
408
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
+ )
414
416
)
415
- )
417
+ } catch ( e ) {
418
+ state . boardFiles = [ ]
419
+ }
416
420
} else {
417
421
state . boardFiles = [ ]
418
422
}
419
423
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
+ )
425
431
)
426
- )
432
+ } catch ( e ) {
433
+ state . diskNavigationRoot = null
434
+ state . diskNavigationPath = '/'
435
+ state . isLoadingFiles = false
436
+ emitter . emit ( 'render' )
437
+ return
438
+ }
427
439
428
440
emitter . emit ( 'refresh-selected-files' )
429
441
state . isLoadingFiles = false
You can’t perform that action at this time.
0 commit comments