summaryrefslogtreecommitdiffstats
path: root/kioslave/media/mediaimpl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kioslave/media/mediaimpl.cpp')
-rw-r--r--kioslave/media/mediaimpl.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/kioslave/media/mediaimpl.cpp b/kioslave/media/mediaimpl.cpp
index 741227cdb..516bcdb01 100644
--- a/kioslave/media/mediaimpl.cpp
+++ b/kioslave/media/mediaimpl.cpp
@@ -226,6 +226,13 @@ bool MediaImpl::ensureMediumMounted(Medium &medium)
m_lastErrorMessage = i18n("No such medium.");
return false;
}
+
+ if ( medium.isEncrypted() && medium.clearDeviceUdi().isEmpty() )
+ {
+ m_lastErrorCode = KIO::ERR_COULD_NOT_MOUNT;
+ m_lastErrorMessage = i18n("The drive is encrypted.");
+ return false;
+ }
if ( medium.needMounting() )
{