diff --git a/ChangeLog b/ChangeLog index f3d4f61..7c39ce0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,9 @@ +TinyMount-0.2.5 +--------------- + - Fix flash drives without partition table is not shown. + TinyMount-0.2.4 +--------------- - Add setting to hide the tray icon if there are no connected devices. TinyMount-0.2.2 diff --git a/src/diskmanager.cpp b/src/diskmanager.cpp index 75359a8..1b0ce7d 100644 --- a/src/diskmanager.cpp +++ b/src/diskmanager.cpp @@ -120,7 +120,9 @@ DeviceInfoPtr DiskManager::deviceForPath(const QDBusObjectPath &path) qDebug() << dev.nativePath(); qDebug() << "\tsize =" << dev.deviceSize(); qDebug() << "\tisDrive =" << dev.deviceIsDrive(); + qDebug() << "\tcanDetach =" << dev.driveCanDetach(); qDebug() << "\tisVolume =" << dev.deviceIsPartition(); + qDebug() << "\tpartType =" << dev.partitionType(); qDebug() << "\tisParttable =" << dev.deviceIsPartitionTable(); qDebug() << "\tisRemovable =" << dev.deviceIsRemovable(); qDebug() << "\tisMounted =" << dev.deviceIsMounted(); @@ -135,30 +137,25 @@ DeviceInfoPtr DiskManager::deviceForPath(const QDBusObjectPath &path) DeviceInfoPtr d; - if (dev.deviceIsPartition() || dev.deviceIsOpticalDisc()) + if (dev.idUsage() == "filesystem") { - if (dev.partitionType() != "0x05" // extended partition - && dev.partitionType() != "0x0f" // extended Win95 partition - && dev.idType() != "swap" // skip swap - ) - { - d = DeviceInfoPtr(new DeviceInfo); - - d->udisksPath = path.path(); - const QString& label = dev.idLabel(); - const QString& fn = dev.deviceFile(); - d->name = label.isEmpty() ? fn.mid(fn.lastIndexOf('/') + 1) : label; - d->size = dev.deviceSize(); - d->fileSystem = dev.idType(); - d->type = dev.deviceIsSystemInternal() ? DeviceInfo::HDD : - dev.deviceIsOpticalDisc() ? DeviceInfo::CD : - dev.driveMediaCompatibility().contains("floppy") ? DeviceInfo::Floppy : - containsFlashTypes(dev.driveMediaCompatibility()) ? DeviceInfo::Flash : - DeviceInfo::Other; - d->isMounted = dev.deviceIsMounted(); - if (d->isMounted) d->mountPoint = dev.deviceMountPaths().first(); - d->isSystem = dev.deviceIsSystemInternal(); - } + qDebug() << "3333333333"; + d = DeviceInfoPtr(new DeviceInfo); + + d->udisksPath = path.path(); + const QString& label = dev.idLabel(); + const QString& fn = dev.deviceFile(); + d->name = label.isEmpty() ? fn.mid(fn.lastIndexOf('/') + 1) : label; + d->size = dev.deviceSize(); + d->fileSystem = dev.idType(); + d->type = dev.deviceIsSystemInternal() ? DeviceInfo::HDD : + dev.deviceIsOpticalDisc() ? DeviceInfo::CD : + dev.driveMediaCompatibility().contains("floppy") ? DeviceInfo::Floppy : + containsFlashTypes(dev.driveMediaCompatibility()) ? DeviceInfo::Flash : + DeviceInfo::Other; + d->isMounted = dev.deviceIsMounted(); + if (d->isMounted) d->mountPoint = dev.deviceMountPaths().first(); + d->isSystem = dev.deviceIsSystemInternal(); } return d; diff --git a/src/src.pro b/src/src.pro index 16fc204..0435fb4 100644 --- a/src/src.pro +++ b/src/src.pro @@ -19,7 +19,7 @@ TEMPLATE = app TARGET = tinymount -VERSION = 0.2.4 +VERSION = 0.2.5 DEPENDPATH += . INCLUDEPATH += .