You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "sterling gerritz (JIRA)" <ji...@apache.org> on 2016/10/27 23:49:00 UTC
[jira] [Resolved] (CB-7294) File plugin: getParent returns same
entry
[ https://issues.apache.org/jira/browse/CB-7294?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
sterling gerritz resolved CB-7294.
----------------------------------
Resolution: Cannot Reproduce
Was unable to reproduce error (see code below), the issue was likely already resolved due to previous fixes.
{code}
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function (fs) {
fs.root.getDirectory("DirIAdded",{ create: true },function(dir){
window.resolveLocalFileSystemURL('cdvfile://localhost/persistent/DirIAdded/',
function(dir){
dir.getParent(function(parent){
console.log('parent is :: ' + parent.fullPath);
});
},
function(err) {
console.log("got an error : " + JSON.stringify(err));
}
);
},
function (err) {
console.log("err dir :: " + err.code);
});
});
{code}
> 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: sterling gerritz
> 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.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org