mirror of
https://github.com/balena-io/etcher.git
synced 2025-04-24 07:17:18 +00:00
Prevent an invalid drive from being auto-selected (#484)
Currently we have logic in the drive selector dialog to prevent invalid drives (too small, locked, etc) from being selected, however we are not protecting auto-selection from these invalid devices. Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
This commit is contained in:
parent
a5fbe40b2d
commit
21b6e1aabc
@ -165,6 +165,10 @@ app.controller('AppController', function(
|
||||
if (drives.length === 1 && self.selection.hasImage()) {
|
||||
const drive = _.first(drives);
|
||||
|
||||
if (!self.selection.isDriveValid(drive)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Do not autoselect the same drive over and over again
|
||||
// and fill the logs unnecessary.
|
||||
// `angular.equals` is used instead of `_.isEqual` to
|
||||
|
Loading…
x
Reference in New Issue
Block a user