diff --git a/lib/gui/app.js b/lib/gui/app.js index 3abbd3f6..c598b0ba 100644 --- a/lib/gui/app.js +++ b/lib/gui/app.js @@ -265,7 +265,13 @@ app.controller('AppController', function( }; this.wasLastFlashSuccessful = () => { - return _.get(this.writer.getFlashResults(), 'passedValidation', true); + const flashResults = this.writer.getFlashResults(); + + if (_.get(flashResults, 'cancelled', false)) { + return true; + } + + return _.get(flashResults, 'passedValidation', true); }; this.flash = (image, drive) => { diff --git a/lib/gui/modules/image-writer.js b/lib/gui/modules/image-writer.js index 060986a1..3cb32816 100644 --- a/lib/gui/modules/image-writer.js +++ b/lib/gui/modules/image-writer.js @@ -242,9 +242,10 @@ imageWriter.service('ImageWriterService', function($q, $timeout, SettingsModel) return this.performWrite(image, drive, this.setProgressState).then((results) => { // TODO: Make sure `etcher-image-write` always - // sends a `cancelled` property. + // sends a `cancelled` and `passedValidation` property. _.defaults(results, { - cancelled: false + cancelled: false, + passedValidation: false }); this.unsetFlashingFlag(results);