You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Ian Clelland (JIRA)" <ji...@apache.org> on 2014/02/28 14:03:20 UTC

[jira] [Assigned] (CB-6053) DirectoryEntry.getFile() fails for relative paths

     [ https://issues.apache.org/jira/browse/CB-6053?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ian Clelland reassigned CB-6053:
--------------------------------

    Assignee: Jesse MacFadyen  (was: Ian Clelland)

Jesse, could you or [~sgrebnov] take a look at the proposed patch? I don't have a proper WP8 test environment to validate it.

Let me know if you have any questions about what it's *supposed* to do.

> DirectoryEntry.getFile() fails for relative paths
> -------------------------------------------------
>
>                 Key: CB-6053
>                 URL: https://issues.apache.org/jira/browse/CB-6053
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin File, Windows 8
>    Affects Versions: 3.3.0
>         Environment: Windows 8
>            Reporter: Stepan Riha
>            Assignee: Jesse MacFadyen
>
> According to the spec, DirectoryEntry.getFile() is supposed to support specifying a relative path.  However, specifying a relative path (and option.create=false) will cause the method to fail with {{FileError.ENCODING_ERR}}.
> The culprit seems to be following code in FileProxy.getFile() - it tests for invalid *file _name_* characters but should really be testing invalid *file _path_* characters (i.e. it should allow {{/}}).
> {code:title=FileProxy.js}
>                     if (/\?|\\|\*|\||\"|<|>|\:|\//g.test(path)) {
>                         fail && fail(FileError.ENCODING_ERR);
>                         return;
>                     }
> {code}



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)