Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
4.2.0
-
Qt Installer Sprint 49
Description
When having TargetDir with specific separator types (i.e. forward slashes), calling installer.toNativeSeparators("@TargetDir@") does not fix the separator types as the @TargetDir@ is not evaluated until later.
Not working code:
// assume @TargetDir@ is "C:/temp" var targetDir = "@TargetDir@"; var fullPath = targetDir + "/additional/path"; console.log("Path: " + installer.toNativeSeparators(fullPath));
This would print out:
Path: C:/temp\additional\path
This can be worked around by getting the @TargetDir@ before calling the toNativeSeparators:
var targetDir = installer.value("TargetDir"); var fullPath = targetDir + "/additional/path"; console.log("Path: " + installer.toNativeSeparators(fullPath));
Attachments
For Gerrit Dashboard: QTIFW-2488 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
392072,2 | Use Windows path separators in TargetDir in Windows | master | installer-framework/installer-framework | Status: ABANDONED | +1 | 0 |
392173,3 | Doc: Update toNativeSeparators/fromNativeSeparators doc | 4.3 | installer-framework/installer-framework | Status: MERGED | +2 | 0 |