diff --git a/kerfuffle/jobs.cpp b/kerfuffle/jobs.cpp --- a/kerfuffle/jobs.cpp +++ b/kerfuffle/jobs.cpp @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include @@ -319,8 +318,12 @@ } if (m_isSingleFolderArchive) { + QString fullPath = entry->fullPath(); // RPM filenames have the ./ prefix, and "." would be detected as the subfolder name, so we remove it. - const QString fullPath = entry->fullPath().remove(QRegularExpression(QStringLiteral("^\\./"))); + if (fullPath.startsWith(QLatin1String("./"))) { + fullPath = fullPath.remove(0, 2); + } + const QString basePath = fullPath.split(QLatin1Char('/')).at(0); if (m_basePath.isEmpty()) {