Commit a6ecc885 authored by Antonio Rojas's avatar Antonio Rojas
Browse files

Fix kio-mtp with libmtp 1.1.19

In libmtp 1.1.19, an empty string is returned instead of NULL for devices without a deviceName, which breaks accessing those devices with kio-mtp
parent 76812be2
......@@ -40,7 +40,7 @@ MTPDevice::MTPDevice(const QString &dbusObjectPath, LIBMTP_mtpdevice_t *device,
const char *deviceModel = LIBMTP_Get_Modelname(device);
// prefer friendly devicename over model
if (!deviceName) {
if (!deviceName || strlen(deviceName) == 0) {
m_friendlyName = QString::fromUtf8(deviceModel);
} else {
m_friendlyName = QString::fromUtf8(deviceName);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment