Commit 70ead5fe authored by Albert Astals Cid's avatar Albert Astals Cid
Browse files

zip: Fix detection of backslashed zips

If the \ is escaped then it's not a \ for folders but for filenames

BUGS: 444965
parent b175334b
Pipeline #96712 skipped
......@@ -998,11 +998,14 @@ QString LibzipPlugin::fromUnixSeparator(const QString& path)
QString LibzipPlugin::toUnixSeparator(const QString& path)
{
if (!path.contains(QLatin1Char('\\'))) {
return path;
}
m_backslashedZip = true;
return QString(path).replace(QLatin1Char('\\'), QLatin1Char('/'));
// Even though the two contains may look similar they are not, the first is the \ char
// that needs to be escaped, the second is the string with two \ that doesn't need escaping
// so they look similar but they aren't
if (path.contains(QLatin1Char('\\')) && !path.contains(QLatin1String("\\"))) {
m_backslashedZip = true;
return QString(path).replace(QLatin1Char('\\'), QLatin1Char('/'));
}
return path;
}
bool LibzipPlugin::hasBatchExtractionProgress() const
......
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