Skip to content

Commit

Permalink
ZIP support: make sure that the extraction works on Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
agarny committed Mar 9, 2018
1 parent d4a5fa0 commit 9177e50
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/plugins/support/ZIPSupport/src/qzip.cpp
Expand Up @@ -1181,7 +1181,13 @@ bool QZipReader::extractAll(const QString &destinationDir) const
}

//---OPENCOR--- BEGIN
#if defined(Q_OS_WIN)
static const QRegularExpression FileNameRegEx = QRegularExpression("\\\\[^\\\\]*$");
#elif defined(Q_OS_LINUX) || defined(Q_OS_MAC)
static const QRegularExpression FileNameRegEx = QRegularExpression("/[^/]*$");
#else
#error Unsupported platform
#endif
//---OPENCOR--- END
for (const FileInfo &fi : allFiles) {
const QString absPath = destinationDir + QDir::separator() + fi.filePath;
Expand Down

0 comments on commit 9177e50

Please sign in to comment.