summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/lib7z_facade.cpp
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@theqtcompany.com>2015-06-04 12:42:24 +0200
committerKai Koehne <kai.koehne@theqtcompany.com>2015-06-04 13:02:42 +0200
commit1be5082af805e71ce2ca6ed04ff5de0f069da770 (patch)
tree55d89790592f7391c7587e1432ae462cd58e9c5a /src/libs/installer/lib7z_facade.cpp
parent8482b4da46505c725d93a1e0478ded99bcbde4d2 (diff)
parent09b8632d301ffa865bf717c5497b6b7a17e86b53 (diff)
Merge remote-tracking branch 'origin/2.0'
Conflicts: src/libs/installer/packagemanagercore.cpp Change-Id: Ie3d94fe3a633e189c260bf20682c00a2bb901bc8
Diffstat (limited to 'src/libs/installer/lib7z_facade.cpp')
-rw-r--r--src/libs/installer/lib7z_facade.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/libs/installer/lib7z_facade.cpp b/src/libs/installer/lib7z_facade.cpp
index 9dc4a8283..b4eb36d37 100644
--- a/src/libs/installer/lib7z_facade.cpp
+++ b/src/libs/installer/lib7z_facade.cpp
@@ -1141,12 +1141,13 @@ void Lib7z::createArchive(QFileDevice *archive, const QStringList &sourcePaths,
NWildcard::CCensor censor;
foreach (const QString &path, sourcePaths) {
- const UString sourcePath = QString2UString(QDir::toNativeSeparators(path));
- if (UString2QString(sourcePath) != QDir::toNativeSeparators(path))
- throw UString2QString(sourcePath).toLatin1().data();
- // Only pass recursive with true if path is a directory, otherwise we include the file and
- // possible folders located on the same directory level as the file into the created archive.
- censor.AddItem(true, sourcePath, QFileInfo(path).isDir());
+ const QString cleanPath = QDir::toNativeSeparators(QDir::cleanPath(path));
+ const UString nativePath = QString2UString(cleanPath);
+ if (UString2QString(nativePath) != cleanPath) {
+ throw SevenZipException(QCoreApplication::translate("Lib7z", "Could not convert"
+ "path: %1.").arg(path));
+ }
+ censor.AddItem(true /* always include item */, nativePath, false /* never recurse*/);
}
callback->setSourcePaths(sourcePaths);