solid: remove redundant check in StorageAccess::filePath()

the device links (DEVLINKS property) includes the label link

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2023-06-29 08:13:29 +03:00
parent c882cf5442
commit 38bdfc6e82

View file

@ -65,10 +65,8 @@ QString StorageAccess::filePath() const
const KMountPoint::List mountpoints = KMountPoint::currentMountPoints();
const QString devname(m_device->deviceProperty("DEVNAME"));
const QString devlabel(m_device->deviceProperty("ID_FS_LABEL"));
foreach (const KMountPoint::Ptr mountpoint, mountpoints) {
if (mountpoint->mountedFrom() == devname || mountpoint->realDeviceName() == devname
|| mountpoint->mountedFrom() == devlabel) {
if (mountpoint->mountedFrom() == devname || mountpoint->realDeviceName() == devname) {
return mountpoint->mountPoint();
}
}