summaryrefslogtreecommitdiffstats
path: root/kioslave/media
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-09-02 19:22:36 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-09-02 19:22:36 -0500
commitc25624f641778b9c5d62909f6fff3f6e25af0e9d (patch)
treebea5b545f4a9975fad893a2f70c60fbc69b57cbd /kioslave/media
parentc881335c5f1f595c922e0c7ed72f9ed937dd323c (diff)
downloadtdebase-c25624f641778b9c5d62909f6fff3f6e25af0e9d.tar.gz
tdebase-c25624f641778b9c5d62909f6fff3f6e25af0e9d.zip
Use a pretty mount path if possible
Diffstat (limited to 'kioslave/media')
-rw-r--r--kioslave/media/mediamanager/tdehardwarebackend.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/kioslave/media/mediamanager/tdehardwarebackend.cpp b/kioslave/media/mediamanager/tdehardwarebackend.cpp
index bb12e09ab..892ac44d0 100644
--- a/kioslave/media/mediamanager/tdehardwarebackend.cpp
+++ b/kioslave/media/mediamanager/tdehardwarebackend.cpp
@@ -991,6 +991,14 @@ TQString TDEBackend::mount(const Medium *medium)
if (valids.contains("locale")) {
optionString.append(TQString(" -c %1").arg(valids["locale"]));
}
+
+ if (diskLabel == "") {
+ // Try to use a pretty mount point if possible
+ TQStringList pieces = TQStringList::split("/", sdevice->deviceNode(), FALSE);
+ TQString node = pieces[pieces.count()-1];
+ diskLabel = medium->label() + " (" + node + ")";
+ diskLabel.replace("/", "_");
+ }
TQString qerror = i18n("Cannot mount encrypted drives!");