summaryrefslogtreecommitdiffstats
path: root/tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp')
-rw-r--r--tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp b/tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp
index 8d1e33c82..159f5140a 100644
--- a/tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp
+++ b/tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp
@@ -289,9 +289,17 @@ void MountHelper::safeRemoval(const Medium &medium)
void MountHelper::openRealFolder(const Medium &medium)
{
- if (!medium.mountPoint().isEmpty())
+ Medium &m = const_cast<Medium&>(medium);
+ if (!m.isMounted())
{
- system((TQString("kfmclient exec file://") + medium.mountPoint()).local8Bit());
+ // If the medium is not mounted, try mounting it first
+ mount(m);
+ m = findMedium(m.deviceNode());
+ }
+
+ if (m.isMounted())
+ {
+ system((TQString("kfmclient exec 'file://") + m.mountPoint()).local8Bit() + "'");
}
else
{