Commit 15c9cc6b authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Revert "Optimize ArchiveModel::cleanFileName"

Landed the wrong branch

This reverts commit b9e0da8c.
parent b9e0da8c
...@@ -341,12 +341,12 @@ QString ArchiveModel::cleanFileName(const QString& fileName) ...@@ -341,12 +341,12 @@ QString ArchiveModel::cleanFileName(const QString& fileName)
{ {
// Skip entries with filename "/" or "//" or "." // Skip entries with filename "/" or "//" or "."
// "." is present in ISO files. // "." is present in ISO files.
QRegularExpression pattern(QStringLiteral("/+|\\."));
if (fileName == QStringLiteral("/") || fileName == QStringLiteral("//") || fileName == QStringLiteral(".")) { QRegularExpressionMatch match;
if (fileName.contains(pattern, &match) && match.captured() == fileName) {
qCDebug(ARK) << "Skipping entry with filename" << fileName;
return QString(); return QString();
} } else if (fileName.startsWith(QLatin1String("./"))) {
if (fileName.startsWith(QLatin1String("./"))) {
return fileName.mid(2); return fileName.mid(2);
} }
......
Markdown is supported
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