gui: Also blacklist match against device & raw path

This fixes device blacklist handling to also match against
`drive.device` and `drive.raw`, in order to be able to specify devices
lacking a `devicePath`.

Change-type: patch
Signed-off-by: Jonas Hermsmeier <jhermsmeier@gmail.com>
This commit is contained in:
Jonas Hermsmeier 2018-09-06 15:18:16 +02:00 committed by Alexis Svinartchouk
parent 6c73ddcaca
commit 0d80957639

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 {