From 122a6cd8989a4bd3096fddea908a1c2b223be62a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= Date: Sun, 8 Apr 2018 22:12:10 +0200 Subject: [PATCH 1/5] [UDisks] Correct handling of removable file systems Summary: Filesystems which have no fstab entry have an empty filepath (aka mountpoint), but these should be mountable nevertheless. The StorageAccess.ignored flag should only be used as a hint if a device (filesystem) should create a device item in e.g Dolphin. BUG: 391706 CCBUG: 389479 Reviewers: ngraham, broulik Reviewed By: ngraham Subscribers: #frameworks Tags: #frameworks Differential Revision: https://phabricator.kde.org/D12051 --- src/solid/devices/backends/udisks2/udisksstorageaccess.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/solid/devices/backends/udisks2/udisksstorageaccess.cpp b/src/solid/devices/backends/udisks2/udisksstorageaccess.cpp index dd8f76f..7db2263 100644 --- a/src/solid/devices/backends/udisks2/udisksstorageaccess.cpp +++ b/src/solid/devices/backends/udisks2/udisksstorageaccess.cpp @@ -111,10 +111,10 @@ bool StorageAccess::isIgnored() const const QString path = filePath(); - return !path.isEmpty() - && !path.startsWith(QLatin1String("/media/")) - && !path.startsWith(QLatin1String("/run/media/")) - && !path.startsWith(QDir::homePath()); + bool inUserPath = path.startsWith(QLatin1String("/media/")) || + path.startsWith(QLatin1String("/run/media/")) || + path.startsWith(QDir::homePath()); + return !inUserPath; } bool StorageAccess::setup() -- 2.14.3