Changeset View
Changeset View
Standalone View
Standalone View
src/core/kmountpoint.cpp
Show First 20 Lines • Show All 155 Lines • ▼ Show 20 Line(s) | 151 | if (mountedFrom.startsWith(QLatin1String("LABEL="))) { | |||
---|---|---|---|---|---|
156 | } | 156 | } | ||
157 | } | 157 | } | ||
158 | 158 | | |||
159 | if (infoNeeded & NeedRealDeviceName) { | 159 | if (infoNeeded & NeedRealDeviceName) { | ||
160 | if (mountedFrom.startsWith(QLatin1Char('/'))) { | 160 | if (mountedFrom.startsWith(QLatin1Char('/'))) { | ||
161 | device = QFileInfo(mountedFrom).canonicalFilePath(); | 161 | device = QFileInfo(mountedFrom).canonicalFilePath(); | ||
162 | } | 162 | } | ||
163 | } | 163 | } | ||
164 | // TODO: Strip trailing '/' ? | 164 | mountedFrom = mountedFrom.left(mountedFrom.lastIndexOf(QLatin1Char('/'))); | ||
dfaure: That would turn "/boot/efi" into "/boot" !!
I wonder, did kmountpointtest still pass?
You… | |||||
165 | } | 165 | } | ||
166 | 166 | | |||
167 | void KMountPoint::Private::finalizeCurrentMountPoint(DetailsNeededFlags infoNeeded) | 167 | void KMountPoint::Private::finalizeCurrentMountPoint(DetailsNeededFlags infoNeeded) | ||
168 | { | 168 | { | ||
169 | if (infoNeeded & NeedRealDeviceName) { | 169 | if (infoNeeded & NeedRealDeviceName) { | ||
170 | if (mountedFrom.startsWith(QLatin1Char('/'))) { | 170 | if (mountedFrom.startsWith(QLatin1Char('/'))) { | ||
171 | device = QFileInfo(mountedFrom).canonicalFilePath(); | 171 | device = QFileInfo(mountedFrom).canonicalFilePath(); | ||
172 | } | 172 | } | ||
▲ Show 20 Lines • Show All 311 Lines • Show Last 20 Lines |
That would turn "/boot/efi" into "/boot" !!
I wonder, did kmountpointtest still pass?
You want something like this instead: