Merge pull request #2470 from resin-io/fix-blacklist-setting

gui: Also blacklist match against device & raw path
This commit is contained in:
Alexis Svinartchouk 2018-09-26 10:41:49 +02:00 committed by GitHub
commit 1c5bab63a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -242,7 +242,9 @@ app.run(($timeout) => {
$timeout(() => {
if (BLACKLISTED_DRIVES.length) {
const allowedDrives = drives.filter((drive) => {
return !BLACKLISTED_DRIVES.includes(drive.devicePath)
return !(BLACKLISTED_DRIVES.includes(drive.devicePath) ||
BLACKLISTED_DRIVES.includes(drive.device) ||
BLACKLISTED_DRIVES.includes(drive.raw))
})
availableDrives.setDrives(allowedDrives)
} else {