From 01f0727649273fd36022ba2fe16113a22c7aa1e6 Mon Sep 17 00:00:00 2001 From: Jim Broadus Date: Sat, 5 Dec 2020 00:28:48 -0800 Subject: [PATCH] giolister: Don't include invalid mountpoint url If the gvfs mountpoint property for a volume is empty, we add an empty URL to the devices URL list. This causes errors in duplicate entry detection. --- src/devices/giolister.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/devices/giolister.cpp b/src/devices/giolister.cpp index 3ffedb118..6343036db 100644 --- a/src/devices/giolister.cpp +++ b/src/devices/giolister.cpp @@ -220,7 +220,11 @@ QList GioLister::MakeDeviceUrls(const QString& id) { } } - ret << MakeUrlFromLocalPath(mount_point); + QUrl mount_point_url = MakeUrlFromLocalPath(mount_point); + if (mount_point_url.isValid()) { + ret << mount_point_url; + } + return ret; }