diff options
Diffstat (limited to 'tdeioslave/media/mediaimpl.cpp')
-rw-r--r-- | tdeioslave/media/mediaimpl.cpp | 16 |
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(); } |