From b54fcda719b94c629c11e9b3462f2c9a2c5a9666 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sun, 25 Aug 2019 11:21:21 +0900 Subject: tdeioslave media: fixed handling of mountable state for encrypted devices. Signed-off-by: Michele Calgaro --- tdeioslave/media/libmediacommon/medium.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'tdeioslave/media/libmediacommon/medium.cpp') diff --git a/tdeioslave/media/libmediacommon/medium.cpp b/tdeioslave/media/libmediacommon/medium.cpp index 7ded6f0f1..c185a8c9f 100644 --- a/tdeioslave/media/libmediacommon/medium.cpp +++ b/tdeioslave/media/libmediacommon/medium.cpp @@ -179,7 +179,14 @@ void Medium::setDeviceNode(const TQString &deviceNode) void Medium::setMountPoint(const TQString &mountPoint) { - m_properties[MOUNT_POINT] = mountPoint; + if (isMountable()) + { + m_properties[MOUNT_POINT] = mountPoint; + } + else + { + m_properties[MOUNT_POINT] = TQString::null; + } } void Medium::setFsType(const TQString &fsType) @@ -189,7 +196,14 @@ void Medium::setFsType(const TQString &fsType) void Medium::setMounted(bool mounted) { - m_properties[MOUNTED] = mounted ? "true" : "false"; + if (isMountable()) + { + m_properties[MOUNTED] = mounted ? "true" : "false"; + } + else + { + m_properties[MOUNTED] = "false"; + } } void Medium::setBaseURL(const TQString &baseURL) -- cgit v1.2.1