summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tdecore/tdehardwaredevices.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/tdecore/tdehardwaredevices.cpp b/tdecore/tdehardwaredevices.cpp
index 8cf86d721..1b7a2c8ac 100644
--- a/tdecore/tdehardwaredevices.cpp
+++ b/tdecore/tdehardwaredevices.cpp
@@ -4311,7 +4311,7 @@ TDEGenericDevice* TDEHardwareDevices::classifyUnknownDevice(udev_device* dev, TD
diskstatus = diskstatus | TDEDiskDeviceStatus::Hotpluggable;
}
- if ((filesystemtype.upper() != "CRYPTO_LUKS") && (filesystemtype.upper() != "CRYPTO") && (!filesystemtype.isNull())) {
+ if ((filesystemtype.upper() != "CRYPTO_LUKS") && (filesystemtype.upper() != "CRYPTO") && (filesystemtype.upper() != "SWAP") && (!filesystemtype.isNull())) {
diskstatus = diskstatus | TDEDiskDeviceStatus::ContainsFilesystem;
}
@@ -4328,6 +4328,10 @@ TDEGenericDevice* TDEHardwareDevices::classifyUnknownDevice(udev_device* dev, TD
diskstatus = diskstatus & ~TDEDiskDeviceStatus::Mountable;
}
}
+ // Swap partitions cannot be mounted
+ if (filesystemtype.upper() == "SWAP") {
+ diskstatus = diskstatus & ~TDEDiskDeviceStatus::Mountable;
+ }
// If certain disk types do not report the presence of a filesystem, they are likely not mountable
if ((disktype & TDEDiskDeviceType::HDD) || (disktype & TDEDiskDeviceType::Optical)) {
if (!(diskstatus & TDEDiskDeviceStatus::ContainsFilesystem)) {