File tree Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -53,10 +53,6 @@ const Serial = {
53
53
const output = await board . fs_cat ( file )
54
54
return output || ''
55
55
} ,
56
- loadFileBytes : async ( file ) => {
57
- const output = await board . fs_cat_bytes ( file )
58
- return output || ''
59
- } ,
60
56
removeFile : async ( file ) => {
61
57
return board . fs_rm ( file )
62
58
} ,
@@ -67,7 +63,7 @@ const Serial = {
67
63
return board . fs_put ( src , dest , dataConsumer )
68
64
} ,
69
65
downloadFile : async ( src , dest ) => {
70
- let contents = await Serial . loadFileBytes ( src )
66
+ let contents = await Serial . loadFile ( src )
71
67
return ipcRenderer . invoke ( 'save-file' , dest , contents )
72
68
} ,
73
69
renameFile : async ( oldName , newName ) => {
Original file line number Diff line number Diff line change @@ -1090,11 +1090,12 @@ async function store(state, emitter) {
1090
1090
selectedFile . fileName
1091
1091
)
1092
1092
)
1093
+ const bytesToSource = String . fromCharCode . apply ( null , fileContent ) ;
1093
1094
file = createFile ( {
1094
1095
parentFolder : state . boardNavigationPath ,
1095
1096
fileName : selectedFile . fileName ,
1096
1097
source : selectedFile . source ,
1097
- content : fileContent
1098
+ content : bytesToSource
1098
1099
} )
1099
1100
file . editor . onChange = function ( ) {
1100
1101
file . hasChanges = true
You can’t perform that action at this time.
0 commit comments