- 
    
Bug
 - 
    Resolution: Fixed
 - 
    
P2: Important
 - 
    4.2.0
 
- 
        Qt Installer Sprint 49
 
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));