From ad3cef031b88e1c889a129f569ff5eafe1947d06 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Tue, 23 Feb 2021 21:54:12 +0900 Subject: tdeioslave media: made 'Open Medium System Folder' action available for unmounted medium too. The action is now also available in the notification dialog that opens up when a medium is inserted. Fixed action support for mount path containing spaces. Signed-off-by: Michele Calgaro --- tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp') 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); + 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 { -- cgit v1.2.1