GETFILE/UPLOAD don't handle pre-emption

This commit is contained in:
Michal Moskal
2017-07-07 13:41:21 +01:00
parent 5af3cc4345
commit ce3fe646fd
2 changed files with 28 additions and 14 deletions

View File

@ -41,9 +41,8 @@ namespace pxt.editor {
return initAsync()
.then(w_ => {
w = w_
// run LS to make sure we can talk to device first
// otherwise flashing a file might lock it
return w.lsAsync("/")
if (w.isStreaming)
U.userError("please stop the program first")
}).then(() => {
let f = U.stringToUint8Array(atob(resp.outfiles[pxt.outputName()]))
return w.flashAsync(elfPath, f)