Skip to content

Commit

Permalink
executeStatement prepends other code onto the command, so don't add `…
Browse files Browse the repository at this point in the history
…\x10` at the start of line as then it just ends up in the middle of what's sent
  • Loading branch information
gfwilliams committed Oct 3, 2024
1 parent 1a5eea9 commit a7da5cf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,8 @@ while (d!==undefined) {console.log(btoa(d));d=f.read(${CHUNKSIZE});}

// Upload a file
function uploadFile(fileName, contents, callback) {
var js = "\x10"+getUploadFileCode(fileName, contents).replace(/\n/g,"\n\x10");
var js = getUploadFileCode(fileName, contents).replace(/\n/g,"\n\x10");
// executeStatement prepends other code onto the command, so don't add `\x10` at the start of line as then it just ends up in the middle of what's sent
Espruino.Core.Utils.executeStatement(js, callback);
}

Expand Down

0 comments on commit a7da5cf

Please sign in to comment.