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.
This commit is contained in:
Jim Broadus 2020-12-05 00:28:48 -08:00 committed by John Maguire
parent df262c5c7e
commit 01f0727649
1 changed files with 5 additions and 1 deletions

View File

@ -220,7 +220,11 @@ QList<QUrl> 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;
}