Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-6383

copy-www-build-step.sh is missing a path separator in the destination

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.4.0
    • None
    • cordova-ios
    • None

    Description

      In copy-www-build-step.sh anywhere that it generates the `subpath` variable it is removing a required path separator.

      For example:

      SRC_DIR="www/"
      DST_DIR="$BUILT_PRODUCTS_DIR/$FULL_PRODUCT_NAME/www"
      
      #... snip ...
      
      for p in $(do_find -type d -print); do
        subpath="${p#$SRC_DIR}"
        mkdir "$DST_DIR$subpath" || exit 1
      done
      

      This will find directories like www/js/, and www/css/.

      The subpath=${p#$SRC_DIR} turns these paths into js/ and css/.

      In the 3rd line, the mkdir command is taking the DST_DIR and concatenating it with subpath... Well, DST_DIR does not end with a directory separator, and subpath does not start with one. So you get a path like /Users/josh/dev/pdk/idsuck/platforms/ios/build/emulator/HelloWorld.app/wwwjs/ when what you really want is /Users/josh/dev/pdk/idsuck/platforms/ios/build/emulator/HelloWorld.app/www/js/

      This issue afflicts all 3 places where subpath is generated in the file.

      Attachments

        Activity

          People

            agrieve Andrew Grieve
            joshperry Joshua Perry
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: