aboutsummaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorIvan Komissarov <abbapoh@gmail.com>2020-02-23 00:45:59 +0100
committerIvan Komissarov <ABBAPOH@gmail.com>2020-02-26 13:57:40 +0000
commit5d12dfe300a2ad984c36af47107380109a06c16e (patch)
tree0ed7206fd351a3287c04b6be1294aa1320c18614 /share
parent7b5e5e0221c0e765b34d35407c2e4484be205ff4 (diff)
Correctly join paths in artifactInstalledFilePath
When building in the root directory (e.g. Q:/) make-release-archives.bat failed to create archive with the error "share\qbs\xamples: no such file or directory". This happened because artifactInstalledFilePath expected no trailing / in installSourceBase. Luckily, FileInfo.joinPaths handles leading / correctly: FileInfo.joinPaths("Q:/foo/", "/bar") results in "Q:/foo/bar" Change-Id: I895288e6bf4c56c2b2972931c3fa1d98e8419aa0 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'share')
-rw-r--r--share/qbs/imports/qbs/ModUtils/utils.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/share/qbs/imports/qbs/ModUtils/utils.js b/share/qbs/imports/qbs/ModUtils/utils.js
index b48b5eb94..541f531ef 100644
--- a/share/qbs/imports/qbs/ModUtils/utils.js
+++ b/share/qbs/imports/qbs/ModUtils/utils.js
@@ -87,7 +87,7 @@ function artifactInstalledFilePath(artifact) {
throw "installSourceBase is not an absolute path";
if (!artifact.filePath.startsWith(installSourceBase))
throw "artifact file path doesn't start with the value of qbs.installSourceBase";
- return FileInfo.joinPaths(targetDir, artifact.filePath.substr(installSourceBase.length + 1));
+ return FileInfo.joinPaths(targetDir, artifact.filePath.substr(installSourceBase.length));
}
return FileInfo.joinPaths(targetDir, artifact.fileName);
}