From 0aaebc24cd00c9dd833c16dd14d1814948baac38 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Tue, 13 Aug 2019 21:21:37 +0900 Subject: Fixed incorrect display of media device mime comment. This relates to issue TDE/tdelibs#35. Signed-off-by: Michele Calgaro (cherry picked from commit df19ff6b7dc7adcdb88e86d50d9d88d622a09d88) --- tdeioslave/media/mediaimpl.cpp | 1 - .../media/mediamanager/tdehardwarebackend.cpp | 33 +++++++++++----------- 2 files changed, 17 insertions(+), 17 deletions(-) (limited to 'tdeioslave/media') diff --git a/tdeioslave/media/mediaimpl.cpp b/tdeioslave/media/mediaimpl.cpp index 7b22a5d22..35bbb9ebc 100644 --- a/tdeioslave/media/mediaimpl.cpp +++ b/tdeioslave/media/mediaimpl.cpp @@ -422,7 +422,6 @@ void MediaImpl::createMediumEntry(TDEIO::UDSEntry& entry, addAtom(entry, TDEIO::UDS_FILE_TYPE, S_IFDIR); addAtom(entry, TDEIO::UDS_MIME_TYPE, 0, medium.mimeType()); - addAtom(entry, TDEIO::UDS_GUESSED_MIME_TYPE, 0, "inode/directory"); if (medium.softHidden()) { addAtom(entry, TDEIO::UDS_HIDDEN , true); diff --git a/tdeioslave/media/mediamanager/tdehardwarebackend.cpp b/tdeioslave/media/mediamanager/tdehardwarebackend.cpp index b6976b68a..8869095d1 100644 --- a/tdeioslave/media/mediamanager/tdehardwarebackend.cpp +++ b/tdeioslave/media/mediamanager/tdehardwarebackend.cpp @@ -350,24 +350,25 @@ void TDEBackend::ResetProperties(TDEStorageDevice * sdevice, bool allowNotificat // Keep these conditions in sync with ::AddDevice above, OR ELSE!!! // BEGIN - - if (!(sdevice->isDiskOfType(TDEDiskDeviceType::LUKS)) - && !(sdevice->checkDiskStatus(TDEDiskDeviceStatus::ContainsFilesystem)) - && !(sdevice->isDiskOfType(TDEDiskDeviceType::CDAudio)) - && !(sdevice->checkDiskStatus(TDEDiskDeviceStatus::Blank)) - ) { - } - else { - // Do not list the LUKS backend device if it has been unlocked elsewhere - if (sdevice->isDiskOfType(TDEDiskDeviceType::LUKS)) { - if (sdevice->holdingDevices().count() > 0) { - m->setHidden(true); - } - else { - m->setHidden(false); + if (sdevice->isDiskOfType(TDEDiskDeviceType::HDD)) { + if (!(sdevice->isDiskOfType(TDEDiskDeviceType::LUKS)) + && !(sdevice->checkDiskStatus(TDEDiskDeviceStatus::ContainsFilesystem)) + && !(sdevice->isDiskOfType(TDEDiskDeviceType::CDAudio)) + && !(sdevice->checkDiskStatus(TDEDiskDeviceStatus::Blank)) + ) { + } + else { + // Do not list the LUKS backend device if it has been unlocked elsewhere + if (sdevice->isDiskOfType(TDEDiskDeviceType::LUKS)) { + if (sdevice->holdingDevices().count() > 0) { + m->setHidden(true); + } + else { + m->setHidden(false); + } } + setVolumeProperties(m); } - setVolumeProperties(m); } if ((sdevice->isDiskOfType(TDEDiskDeviceType::CDROM)) -- cgit v1.2.1