You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Vivek Thakur (JIRA)" <ji...@apache.org> on 2014/08/18 11:35:18 UTC

[jira] [Commented] (CB-7294) File plugin: getParent returns same entry

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

Vivek Thakur commented on CB-7294:
----------------------------------

[~davidnormo]
I tried replicating the issue, But getParent seems to run fine for me on an 4.4.2 Nexus 7 emulator.

Behaviour of getParent():
cdvfile://localhost/persistent/DirIAdded/ returns the root of the persistent storage with parent.fullPath as / and a blank parent.name
cdvfile://localhost/persistent/DirIAdded/test (with and without trailing slash) returns DirectoryEntry for DirIAdded which is expected.

Could you please check again?

> File plugin: getParent returns same entry
> -----------------------------------------
>
>                 Key: CB-7294
>                 URL: https://issues.apache.org/jira/browse/CB-7294
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 3.5.0
>         Environment: Nexus 7 (2013) - Android 4.4.2
> Mac OS X 10.9.4
>            Reporter: David Normington
>            Assignee: Vivek Thakur
>            Priority: Minor
>
> {code:javascript}
> window.resolveLocalFileSystemURL('cdvfile://localhost/persistent/DirIAdded/', 
>    function(dir){
>       dir.getParent(function(parent){
>          console.log(parent);
>       });
>    }
> );
> {code}
> The above code logs the DirectoryEntry for DirIAdded when it should log the parent directory of DirIAdded. If you then run the same code but remove the last slash from the end of the URL, the code works fine. 
> Checked on iOS 7 and there are no problems with a trailing slash or not.



--
This message was sent by Atlassian JIRA
(v6.2#6252)