From c25624f641778b9c5d62909f6fff3f6e25af0e9d Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 2 Sep 2012 19:22:36 -0500 Subject: Use a pretty mount path if possible --- kioslave/media/mediamanager/tdehardwarebackend.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'kioslave/media') 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!"); -- cgit v1.2.1