summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp12
-rw-r--r--tdeioslave/media/services/media_realfolder.desktop4
2 files changed, 12 insertions, 4 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
{
diff --git a/tdeioslave/media/services/media_realfolder.desktop b/tdeioslave/media/services/media_realfolder.desktop
index 450a15189..a89066c53 100644
--- a/tdeioslave/media/services/media_realfolder.desktop
+++ b/tdeioslave/media/services/media_realfolder.desktop
@@ -1,8 +1,8 @@
[Desktop Entry]
-X-TDE-ServiceTypes=media/bluray_mounted,media/camera_mounted,media/cdrom_mounted,media/cd-r_mounted,media/cd-rw_mounted,media/dvd_mounted,media/floppy5_mounted,media/floppy_mounted,media/hdd_mounted,media/nfs_mounted,media/smb_mounted,media/removable_mounted,media/zip_mounted
+X-TDE-ServiceTypes=media/bluray_mounted,media/bluray_unmounted,media/camera_mounted,media/camera_unmounted,media/cdrom_mounted,media/cdrom_unmounted,media/cd-r_mounted,media/cd-r_unmounted,media/cd-rw_mounted,media/cd-rw_unmounted,media/dvd_mounted,media/dvd_unmounted,media/floppy5_mounted,media/floppy5_unmounted,media/floppy_mounted,media/floppy_unmounted,media/hdd_mounted,media/hdd_unmounted,media/nfs_mounted,media/nfs_unmounted,media/removable_mounted,media/removable_unmounted,media/smb_mounted,media/smb_unmounted,media/zip_mounted,media/zip_unmounted,media/audiocd,media/blurayvideo,media/dvdvideo,media/svcd,media/vcd
Actions=MediaRealFolder
X-TDE-Priority=TopLevel
-X-TDE-MediaNotifierHide=true
+X-TDE-MediaNotifierHide=false
[Desktop Action MediaRealFolder]
Exec=tdeio_media_mounthelper -f %u