diff options
| author | Jake Petroules <jake.petroules@petroules.com> | 2015-07-25 17:38:53 -0700 |
|---|---|---|
| committer | Jake Petroules <jake.petroules@petroules.com> | 2015-07-27 09:18:42 +0000 |
| commit | 9372b73c7f55471dbc0346ada2253c5b4cebd58b (patch) | |
| tree | 75096d9a123efcca47ef8f108a6a5213b73cbeed | |
| parent | 0bf24a2fb7b73e5e6d5365e7478b2eb68fc47db4 (diff) | |
| download | qbs-9372b73c7f55471dbc0346ada2253c5b4cebd58b.tar.gz | |
Make installSourceBase work with absolute paths.
This also fixes the error message, as a side effect.
Change-Id: I2af7369ff2e9716d760d5a024970f1808dcf2de4
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
| -rw-r--r-- | src/lib/corelib/buildgraph/productinstaller.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/corelib/buildgraph/productinstaller.cpp b/src/lib/corelib/buildgraph/productinstaller.cpp index cbe5327c8..584ff28bb 100644 --- a/src/lib/corelib/buildgraph/productinstaller.cpp +++ b/src/lib/corelib/buildgraph/productinstaller.cpp @@ -121,13 +121,13 @@ QString ProductInstaller::targetFilePath(const TopLevelProject *project, // This has the same effect as if installSourceBase would equal the directory of the file. targetFilePath = FileInfo::fileName(sourceFilePath); } else { - const QString localAbsBasePath = QDir::cleanPath(productSourceDir + QLatin1Char('/') - + installSourceBase); + const QString localAbsBasePath = FileInfo::resolvePath(QDir::cleanPath(productSourceDir), + QDir::cleanPath(installSourceBase)); targetFilePath = sourceFilePath; if (!targetFilePath.startsWith(localAbsBasePath)) { throw ErrorInfo(Tr::tr("Cannot install '%1', because it doesn't start with the" " value of qbs.installSourceBase '%2'.").arg(sourceFilePath, - installSourceBase)); + localAbsBasePath)); } targetFilePath.remove(0, localAbsBasePath.length() + 1); |
