diff options
author | Michele Calgaro <[email protected]> | 2021-02-23 21:54:12 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2021-02-24 11:00:27 +0900 |
commit | ad3cef031b88e1c889a129f569ff5eafe1947d06 (patch) | |
tree | 9c89a707320ac005a6cff4b49772cf79e4b84fe6 /tdeioslave/media/mounthelper | |
parent | 75204ade2daef3f72d96671439e7e26cc118f4ae (diff) | |
download | tdebase-ad3cef031b88e1c889a129f569ff5eafe1947d06.tar.gz tdebase-ad3cef031b88e1c889a129f569ff5eafe1947d06.zip |
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 <[email protected]>
Diffstat (limited to 'tdeioslave/media/mounthelper')
-rw-r--r-- | tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp | 12 |
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 { |