Commit 8173cc28 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 c3d158c6
Pipeline #84891 passed with stage
in 5 minutes and 47 seconds
......@@ -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);
Supports Markdown
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