mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-19 01:06:36 +00:00
Reset writer state on flash error (#330)
Not doing so leads the writer state to have a `progress` of `100%`, while `isFlashing()` is `false`, which is an inconsistent state. Fixes: https://github.com/resin-io/etcher/issues/327 Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
This commit is contained in:
parent
0dcc7b22b8
commit
34ae49df38
@ -249,7 +249,10 @@ app.controller('AppController', function(
|
||||
AnalyticsService.logEvent('Flash error');
|
||||
}
|
||||
})
|
||||
.catch(dialog.showError)
|
||||
.catch(function(error) {
|
||||
self.writer.resetState();
|
||||
dialog.showError(error);
|
||||
})
|
||||
.finally(OSWindowProgressService.clear);
|
||||
};
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user