summaryrefslogtreecommitdiffstats
path: root/tdeioslave/media/mediaimpl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tdeioslave/media/mediaimpl.cpp')
-rw-r--r--tdeioslave/media/mediaimpl.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/tdeioslave/media/mediaimpl.cpp b/tdeioslave/media/mediaimpl.cpp
index 7b22a5d22..1d00bebf2 100644
--- a/tdeioslave/media/mediaimpl.cpp
+++ b/tdeioslave/media/mediaimpl.cpp
@@ -266,12 +266,16 @@ bool MediaImpl::ensureMediumMounted(Medium &medium)
DCOPRef mediamanager("kded", "mediamanager");
DCOPReply reply = mediamanager.call( "mount", medium.id());
- if (reply.isValid())
- reply.get(m_lastErrorMessage);
- else
- m_lastErrorMessage = i18n("Internal Error");
- if (!m_lastErrorMessage.isEmpty())
- m_lastErrorCode = TDEIO::ERR_SLAVE_DEFINED;
+ TQStringVariantMap mountResult;
+ if (reply.isValid()) {
+ reply.get(mountResult);
+ }
+ if (!mountResult.contains("result") || !mountResult["result"].toBool()) {
+ m_lastErrorMessage = mountResult.contains("errStr") ? mountResult["errStr"].toString() : i18n("Unknown mount error.");
+ }
+ if (!m_lastErrorMessage.isEmpty()) {
+ m_lastErrorCode = TDEIO::ERR_SLAVE_DEFINED;
+ }
else {
tqApp->eventLoop()->enterLoop();
}