Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
1.9.1
-
None
-
d0f22778ed84d4aa28ffdb423ecda15cfd2066ea
Description
On Windows, if you set, for example:
qbs.installPrefix: FileInfo.joinPaths(project.buildDirectory, ["qbs", qbsbuildconfig.targetOSFileInfix, qbs.architecture, qbsversion.version].join("-"))
This will result in an error like:
Directory 'C:\Users\ContainerAdministrator\AppData\Local\Temp\qbs-release-1.11.0\build\release\install-root\C:\Users\ContainerAdministrator\AppData\Local\Temp\qbs-release-1.11.0\build\release\qbs-windows-x86-1.11.0\share\doc\qbs' could not be created.
The documentation for qbs.installPrefix states "The installPrefix itself is relative to the installRoot in the context of installation." (somewhat implying it is relative) while the Installing Files guide does not actually give any examples of how qbs.installRoot, qbs.installPrefix, and qbs.installDir get combined in practice.
We should clarify which paths are required/allowed to be absolute/relative and how they get combined in practice.
In any case, drive letters need to be taken into account when combining Windows paths. Forcibly rebasing paths on Unix is simple: /Users/bob/Builds + /usr/local becomes /Users/bob/Builds/usr/local while on Windows, C:\Users\bob\Builds + C:\Software should become C:\Users\bob\Builds\Software, not C:\Users\bob\Builds\C:\Software, and combining paths with different drive letters should potentially be a fatal error.