solid: update content signal to take into account crypto devices

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2021-07-24 16:24:01 +03:00
parent d4c3a13f3a
commit b647b6bacd

View file

@ -263,7 +263,8 @@ void UDevManager::slotDeviceChanged(const UdevQt::Device &device)
if (d->isOfInterest(udiPrefix() + device.sysfsPath(), device)) {
if (device.subsystem() == "block") {
const QString idfsusage = device.deviceProperty("ID_FS_USAGE");
emit contentChanged(udiPrefix() + device.sysfsPath(), (idfsusage == "filesystem"));
const bool hascontent = (idfsusage == "filesystem" || idfsusage == "crypto");
emit contentChanged(udiPrefix() + device.sysfsPath(), hascontent);
}
}
}