Fixed incorrect display of media device mime comment. This relates to

issue TDE/tdelibs#35.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/56/head
Michele Calgaro 4 years ago
parent 2d7de7cea4
commit df19ff6b7d
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -426,7 +426,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);

@ -360,24 +360,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))

Loading…
Cancel
Save