File tree 1 file changed +6
-4
lines changed
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -494,13 +494,15 @@ function store(state, emitter) {
494
494
contents ,
495
495
( e ) => emitter . emit ( 'message' , `Saving ${ filename } on ${ deviceName } . ${ e } ` )
496
496
)
497
- await serial . renameFile ( oldPath , state . serialNavigation + '/' + filename )
497
+ await serial . renameFile ( oldPath , cleanPath ( state . serialNavigation + '/' + filename ) )
498
498
} else {
499
499
const newPath = cleanPath ( state . serialNavigation + '/' + filename )
500
500
// If old name doesn't exist create new file
501
- // First create an empty file
502
- await serial . saveFileContent ( newPath , '' )
503
- await serial . saveFileContent ( newPath , contents )
501
+ await serial . saveFileContent (
502
+ newPath ,
503
+ contents ,
504
+ ( e ) => emitter . emit ( 'message' , `Saving ${ filename } on ${ deviceName } . ${ e } ` )
505
+ )
504
506
}
505
507
state . isEditingFilename = false
506
508
emitter . emit ( 'message' , `Saved` , 500 )
You can’t perform that action at this time.
0 commit comments