Commit bfc96abd authored by Méven Car's avatar Méven Car
Browse files

tag:/ better handle uds name field

Break the loop in stat since the first element is "." or the file.

BUG: 449126
parent 8858257f
Pipeline #184441 passed with stage
in 2 minutes and 11 seconds
......@@ -77,6 +77,7 @@ void TagsProtocol::stat(const QUrl& url)
for (const KIO::UDSEntry& entry : std::as_const(result.pathUDSResults)) {
if (entry.stringValue(KIO::UDSEntry::UDS_EXTRA) == result.tag) {
statEntry(entry);
break;
}
}
}
......@@ -313,7 +314,13 @@ TagsProtocol::ParseResult TagsProtocol::parseUrl(const QUrl& url, const QList<Pa
// a tagged file
else if (!tag.isEmpty()) {
displayType = i18n("Tag Fragment");
displayName = tag.section(QLatin1Char('/'), -1);
if (tagSection == QStringLiteral("..")) {
displayName = tag.section(QLatin1Char('/'), -2);
} else if (tagSection == QStringLiteral(".")) {
displayName = tag.section(QLatin1Char('/'), -1);
} else {
displayName = tagSection;
}
}
// The root folder
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment