diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2016-01-23 04:41:59 +0100 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2016-01-23 04:42:14 +0100 |
commit | 0151f8494ab3296a30bca9ea52f60c146db85ba3 (patch) | |
tree | 24674c9a5d8177067d3ada520603cf63b5bd93be /tdecore | |
parent | cec0b42a3c26cd4d3cd129fe856464c67a94e101 (diff) | |
download | tdelibs-0151f8494ab3296a30bca9ea52f60c146db85ba3.tar.gz tdelibs-0151f8494ab3296a30bca9ea52f60c146db85ba3.zip |
Fix using of custom mountpoints with pmount in tdehwlib
This partially resolves Bug 2576
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit c10124c96557042d5a9c0170dd2883557997be3e)
Diffstat (limited to 'tdecore')
-rw-r--r-- | tdecore/tdehw/tdestoragedevice.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tdecore/tdehw/tdestoragedevice.cpp b/tdecore/tdehw/tdestoragedevice.cpp index d08ad178d..d0f7549fa 100644 --- a/tdecore/tdehw/tdestoragedevice.cpp +++ b/tdecore/tdehw/tdestoragedevice.cpp @@ -953,10 +953,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); } } |