From d2da293eaecf382e2fd2b6517b90df62ae21e127 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sun, 16 Jun 2019 22:55:14 +0900 Subject: Adjusted to new icon names and renamed media types related to encrypted drives in a better way. Signed-off-by: Michele Calgaro --- tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp') diff --git a/tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp b/tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp index 75d703b95..f32268855 100644 --- a/tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp +++ b/tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp @@ -104,8 +104,8 @@ MountHelper::MountHelper() : TDEApplication() } if (!medium.needDecryption()) { - m_errorStr = i18n("%1 is already decrypted.").arg(url.prettyURL()); - TQTimer::singleShot(0, this, TQT_SLOT(error()) ); + m_errorStr = i18n("%1 is already unlocked.").arg(url.prettyURL()); + TQTimer::singleShot(0, this, TQT_SLOT(error())); return; } @@ -166,9 +166,9 @@ MountHelper::MountHelper() : TDEApplication() } } - /* If this is a decrypted volume and there is no error yet - * we try to teardown the decryption */ - if (m_errorStr.isNull() && medium.isEncrypted() && !medium.clearDeviceUdi().isNull()) + // If this is an unlocked encrypted volume and there is no error yet, we try to lock it + if (unmountResult.contains("result") && unmountResult["result"].toBool() && + medium.isEncrypted() && !medium.clearDeviceUdi().isNull()) { DCOPReply reply = mediamanager.call( "undecrypt", medium.id()); if (reply.isValid()) { -- cgit v1.2.1