Changeset View
Changeset View
Standalone View
Standalone View
src/solid/devices/backends/udisks2/udisksstorageaccess.cpp
Show First 20 Lines • Show All 105 Lines • ▼ Show 20 Line(s) | |||||
106 | bool StorageAccess::isIgnored() const | 106 | bool StorageAccess::isIgnored() const | ||
107 | { | 107 | { | ||
108 | if (m_device->prop("HintIgnore").toBool()) { | 108 | if (m_device->prop("HintIgnore").toBool()) { | ||
109 | return true; | 109 | return true; | ||
110 | } | 110 | } | ||
111 | 111 | | |||
112 | const QString path = filePath(); | 112 | const QString path = filePath(); | ||
113 | 113 | | |||
114 | return !path.isEmpty() | 114 | bool inUserPath = path.startsWith(QLatin1String("/media/")) || | ||
115 | && !path.startsWith(QLatin1String("/media/")) | 115 | path.startsWith(QLatin1String("/run/media/")) || | ||
116 | && !path.startsWith(QLatin1String("/run/media/")) | 116 | path.startsWith(QDir::homePath()); | ||
117 | && !path.startsWith(QDir::homePath()); | 117 | return !inUserPath; | ||
118 | } | 118 | } | ||
119 | 119 | | |||
120 | bool StorageAccess::setup() | 120 | bool StorageAccess::setup() | ||
121 | { | 121 | { | ||
122 | if (m_teardownInProgress || m_setupInProgress) { | 122 | if (m_teardownInProgress || m_setupInProgress) { | ||
123 | return false; | 123 | return false; | ||
124 | } | 124 | } | ||
125 | m_setupInProgress = true; | 125 | m_setupInProgress = true; | ||
▲ Show 20 Lines • Show All 269 Lines • Show Last 20 Lines |