1
0
Fork 0

Fix issue removing an app that was just installed. Fix #253Fix issue removing an app that was just installed (Fix #253)

master
Gordon Williams 2020-04-08 16:23:51 +01:00
parent a96e69af9c
commit d46e78808e
2 changed files with 7 additions and 1 deletions

View File

@ -6,3 +6,4 @@ Changed for individual apps are listed in `apps/appname/ChangeLog`
* `Remove All Apps` now doesn't perform a reset before erase - fixes inability to update firmware if settings are wrong
* Added optional `README.md` file for apps
* Remove 2v04 version warning, add links in About to official/developer versions
* Fix issue removing an app that was just installed (Fix #253)

View File

@ -16,6 +16,11 @@ uploadApp : (app,skipReset) => { // expects an apps.json structure (i.e. with `s
var maxBytes = fileContents.reduce((b,f)=>b+f.content.length, 0)||1;
var currentBytes = 0;
var appInfoFileName = app.id+".info";
var appInfoFile = fileContents.find(f=>f.name==appInfoFileName);
if (!appInfoFile) reject(`${appInfoFileName} not found`);
var appInfo = JSON.parse(appInfoFile.content);
// Upload each file one at a time
function doUploadFiles() {
// No files left - print 'reboot' message
@ -23,7 +28,7 @@ uploadApp : (app,skipReset) => { // expects an apps.json structure (i.e. with `s
Puck.write(`\x10E.showMessage('Hold BTN3\\nto reload')\n`,(result) => {
Progress.hide({sticky:true});
if (result===null) return reject("");
resolve(app);
resolve(appInfo);
});
return;
}