Index: kioslave/media/mediamanager/halbackend.cpp =================================================================== --- kioslave/media/mediamanager/halbackend.cpp (Revision 593834) +++ kioslave/media/mediamanager/halbackend.cpp (Revision 593835) @@ -215,11 +215,6 @@ !libhal_device_get_property_bool(m_halContext, udi, "volume.disc.is_blank", NULL) ) return; - if ( ( libhal_device_get_property_QString(m_halContext, udi, "volume.fsusage") == "filesystem" && - !libhal_device_get_property_bool(m_halContext, udi, "volume.is_mounted", NULL ) ) && - ( libhal_device_get_property_bool(m_halContext, udi, "volume.ignore", NULL ) ) ) - return; - /* Query drive udi */ QString driveUdi = libhal_device_get_property_QString(m_halContext, udi, "block.storage_device"); /* We don't list floppy volumes because we list floppy drives */ @@ -240,7 +235,19 @@ /* Create medium */ Medium* medium = new Medium(udi, ""); + setVolumeProperties(medium); + if ( isInFstab( medium ).isNull() ) + { + // if it's not mountable by user and not by HAL, don't show it at all + if ( ( libhal_device_get_property_QString(m_halContext, udi, "volume.fsusage") == "filesystem" && + !libhal_device_get_property_bool(m_halContext, udi, "volume.is_mounted", NULL ) ) && + ( libhal_device_get_property_bool(m_halContext, udi, "volume.ignore", NULL ) ) ) + { + delete medium; + return; + } + } QMap<QString,QString> options = MediaManagerUtils::splitOptions(mountoptions(udi)); kdDebug() << "automount " << options["automount"] << endl; if (options["automount"] == "true" && allowNotification ) { @@ -248,7 +255,6 @@ if (!error.isEmpty()) kdDebug() << "error " << error << endl; } - setVolumeProperties(medium); m_mediaList.addMedium(medium, allowNotification); return; @@ -992,7 +998,10 @@ for (; it!=end; ++it) { - kdDebug() << "isInFstab -" << medium->deviceNode() << "- -" << (*it)->realDeviceName() << "- -" << (*it)->mountedFrom() << endl; + QString reald = (*it)->realDeviceName(); + if ( reald.endsWith( "/" ) ) + reald = reald.left( reald.length() - 1 ); + kdDebug() << "isInFstab -" << medium->deviceNode() << "- -" << reald << "- -" << (*it)->mountedFrom() << "-" << endl; if ((*it)->mountedFrom() == medium->deviceNode() || ( !medium->deviceNode().isEmpty() && (*it)->realDeviceName() == medium->deviceNode() ) ) { QStringList opts = (*it)->mountOptions();