summaryrefslogtreecommitdiffstats
path: root/tdecore
diff options
context:
space:
mode:
authorSlávek Banko <[email protected]>2016-01-23 04:41:59 +0100
committerSlávek Banko <[email protected]>2016-01-23 04:41:59 +0100
commitc10124c96557042d5a9c0170dd2883557997be3e (patch)
tree4f2052fd0ef66c3a5304b1c344a02f4e13f9e935 /tdecore
parent893ac9fad0249a9ed959e2e8e28952415291b3a2 (diff)
downloadtdelibs-c10124c96557042d5a9c0170dd2883557997be3e.tar.gz
tdelibs-c10124c96557042d5a9c0170dd2883557997be3e.zip
Fix using of custom mountpoints with pmount in tdehwlib
This partially resolves Bug 2576 Signed-off-by: Slávek Banko <[email protected]>
Diffstat (limited to 'tdecore')
-rw-r--r--tdecore/tdehw/tdestoragedevice.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/tdecore/tdehw/tdestoragedevice.cpp b/tdecore/tdehw/tdestoragedevice.cpp
index e095b9ba1..38907df79 100644
--- a/tdecore/tdehw/tdestoragedevice.cpp
+++ b/tdecore/tdehw/tdestoragedevice.cpp
@@ -1190,10 +1190,21 @@ TQString TDEStorageDevice::mountDevice(TQString mediaName, TDEStorageMountOption
optionString.append(TQString(" -c %1").arg(mountOptions["locale"]));
}
+ TQString mountpoint;
+ if (mountOptions.contains("mountpoint")
+ && !mountOptions["mountpoint"].isEmpty()
+ && (mountOptions["mountpoint"] != "/media/")) {
+ mountpoint = mountOptions["mountpoint"];
+ mountpoint.replace("'", "'\\''");
+ }
+ else {
+ mountpoint = mediaName;
+ }
+
TQString passFileName = passwordFile.name();
passFileName.replace("'", "'\\''");
- command = TQString("pmount -p '%1' %2 '%3' '%4' 2>&1").arg(passFileName).arg(optionString).arg(devNode).arg(mediaName);
+ command = TQString("pmount -p '%1' %2 '%3' '%4' 2>&1").arg(passFileName).arg(optionString).arg(devNode).arg(mountpoint);
}
}