Uploaded image for project: 'Qt Installer Framework'
  1. Qt Installer Framework
  2. QTIFW-2488

toNativeSeparators() does not evaluate installer values properly

    XMLWordPrintable

Details

    • 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

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kamartti Katja Marttila
            jussi_witick Jussi Witick
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes