[ 
https://issues.apache.org/jira/browse/CB-6053?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13904372#comment-13904372
 ] 

Ian Clelland commented on CB-6053:
----------------------------------

An absolute path should technically replace the fullPath -- but that presumes 
that fullPath represents the root of the temporary or persistent file system.

If fullPath on WP is relative to the root of the device, then it should 
probably just strip off everything past the temporary/persistent root and graft 
the new path to *that* instead.

> 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: Ian Clelland
>
> 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)

Reply via email to