summaryrefslogtreecommitdiffstats
path: root/tdecore/tdehardwaredevices.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-08-21 12:20:34 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-08-22 19:43:02 -0500
commit417491794161bd9ecc53003b9c5676cd96ca942b (patch)
tree30414ac6355c2711645bed0e80670a4079b9fcaf /tdecore/tdehardwaredevices.cpp
parent902cfa1755950447263c2d719e9217a97f9b3964 (diff)
downloadtdelibs-417491794161bd9ecc53003b9c5676cd96ca942b.tar.gz
tdelibs-417491794161bd9ecc53003b9c5676cd96ca942b.zip
Fix network device detection
Diffstat (limited to 'tdecore/tdehardwaredevices.cpp')
-rw-r--r--tdecore/tdehardwaredevices.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/tdecore/tdehardwaredevices.cpp b/tdecore/tdehardwaredevices.cpp
index 100a24c8c..8fdbcf07e 100644
--- a/tdecore/tdehardwaredevices.cpp
+++ b/tdecore/tdehardwaredevices.cpp
@@ -3518,8 +3518,10 @@ TDEGenericDevice* TDEHardwareDevices::classifyUnknownDevice(udev_device* dev, TD
if (device->type() == TDEGenericDeviceType::Network) {
// Network devices don't have devices nodes per se, but we can at least return the Linux network name...
TQString potentialdevicenode = systempath;
+ if (potentialdevicenode.endsWith("/")) potentialdevicenode.truncate(potentialdevicenode.length()-1);
potentialdevicenode.remove(0, potentialdevicenode.findRev("/")+1);
TQString potentialparentnode = systempath;
+ if (potentialparentnode.endsWith("/")) potentialparentnode.truncate(potentialparentnode.length()-1);
potentialparentnode.remove(0, potentialparentnode.findRev("/", potentialparentnode.findRev("/")-1)+1);
if (potentialparentnode.startsWith("net/")) {
devicenode = potentialdevicenode;