summaryrefslogtreecommitdiffstats
path: root/tdecore
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2016-01-27 23:08:57 +0100
committerSlávek Banko <slavek.banko@axis.cz>2016-01-27 23:08:57 +0100
commit6dfc04c51a9c2086e2f6a4be75ec847e8ef9f6fb (patch)
tree0f153aae124377a07d7a76ad9a56c06d21f4237f /tdecore
parent6a2a9de49cc8987d0f43bc1076db81771fe2f50e (diff)
downloadtdelibs-6dfc04c51a9c2086e2f6a4be75ec847e8ef9f6fb.tar.gz
tdelibs-6dfc04c51a9c2086e2f6a4be75ec847e8ef9f6fb.zip
Fix ZIP drive classification in tdehwlib
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'tdecore')
-rw-r--r--tdecore/tdehw/tdehardwaredevices.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/tdecore/tdehw/tdehardwaredevices.cpp b/tdecore/tdehw/tdehardwaredevices.cpp
index 6c51e7c31..476605344 100644
--- a/tdecore/tdehw/tdehardwaredevices.cpp
+++ b/tdecore/tdehw/tdehardwaredevices.cpp
@@ -1015,16 +1015,21 @@ TDEDiskDeviceType::TDEDiskDeviceType classifyDiskType(udev_device* dev, const TQ
disktype = disktype | TDEDiskDeviceType::USB;
}
+ if (disktypestring.upper() == "DISK") {
+ disktype = disktype | TDEDiskDeviceType::HDD;
+ }
+
if ((disktypestring.upper() == "FLOPPY")
|| (TQString(udev_device_get_property_value(dev, "ID_DRIVE_FLOPPY")) == "1")) {
disktype = disktype | TDEDiskDeviceType::Floppy;
+ disktype = disktype & ~TDEDiskDeviceType::HDD;
}
- if (disktypestring.upper() == "ZIP") {
- disktype = disktype | TDEDiskDeviceType::Zip;
- }
- if ((devicevendor.upper() == "IOMEGA") && (devicemodel.upper().contains("ZIP"))) {
+ if ((disktypestring.upper() == "ZIP")
+ || (TQString(udev_device_get_property_value(dev, "ID_DRIVE_FLOPPY_ZIP")) == "1")
+ || ((devicevendor.upper() == "IOMEGA") && (devicemodel.upper().contains("ZIP")))) {
disktype = disktype | TDEDiskDeviceType::Zip;
+ disktype = disktype & ~TDEDiskDeviceType::HDD;
}
if ((devicevendor.upper() == "APPLE") && (devicemodel.upper().contains("IPOD"))) {
@@ -1078,10 +1083,6 @@ TDEDiskDeviceType::TDEDiskDeviceType classifyDiskType(udev_device* dev, const TQ
disktype = disktype | TDEDiskDeviceType::Jaz;
}
- if (disktypestring.upper() == "DISK") {
- disktype = disktype | TDEDiskDeviceType::HDD;
- }
-
if (disktypestring.upper() == "CD") {
disktype = disktype | TDEDiskDeviceType::Optical;