cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Grieve (JIRA)" <>
Subject [jira] [Resolved] (CB-6383) is missing a path separator in the destination
Date Wed, 16 Apr 2014 19:46:16 GMT


Andrew Grieve resolved CB-6383.

    Resolution: Fixed
      Assignee: Andrew Grieve

Fixed in 3.5.0-dev

Change the command to explicitly use `/usr/bin/find`. I think this will be safer than changing
the script since it's been working fine other than this issue.

> is missing a path separator in the destination
> ---------------------------------------------------------------------
>                 Key: CB-6383
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 3.4.0
>            Reporter: Joshua Perry
>            Assignee: Andrew Grieve
> In anywhere that it generates the `subpath` variable it is removing
a required path separator.
> For example:
> {code:xml}
> SRC_DIR="www/"
> #... snip ...
> for p in $(do_find -type d -print); do
>   subpath="${p#$SRC_DIR}"
>   mkdir "$DST_DIR$subpath" || exit 1
> done
> {code}
> 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/}}
when what you really want is {{/Users/josh/dev/pdk/idsuck/platforms/ios/build/emulator/}}
> This issue afflicts all 3 places where subpath is generated in the file.

This message was sent by Atlassian JIRA

View raw message