diff --git a/ChangeLog b/ChangeLog index d5653f5b7..860903c53 100644 --- a/ChangeLog +++ b/ChangeLog @@ -29,6 +29,7 @@ 19. Change toolbar colours if palette changes. 20. Add another qt5ct palette work-around. 21. Don't stop library scan just because of failure in 1 directory. +22. Handle empty VolumeIdentifier in MTP devices. 2.3.2 ----- diff --git a/devices/mtpdevice.cpp b/devices/mtpdevice.cpp index 64e095a57..1091f5191 100644 --- a/devices/mtpdevice.cpp +++ b/devices/mtpdevice.cpp @@ -580,6 +580,12 @@ void MtpConnection::updateStorage() LIBMTP_devicestorage_struct *s=device->storage; while (s) { QString volumeIdentifier=QString::fromUtf8(s->VolumeIdentifier); + if (volumeIdentifier.isEmpty()) { + volumeIdentifier=QString::fromUtf8(s->StorageDescription); + } + if (volumeIdentifier.isEmpty()) { + volumeIdentifier="ID:"+QString::number(s->id); + } QList::Iterator it=storage.begin(); QList::Iterator end=storage.end(); for ( ;it!=end; ++it) {