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

Jesse MacFadyen commented on CB-6571:
-------------------------------------

So what about doing this in `DirectoryEntry.getDirectory` ? .. or 
DirectoryEntry constructor? 

{code}
    var win = successCallback && function (result) {
        var fullPath = result.fullPath;
        // add trailing slash if it is missing
        if (!/\/$/.test(fullPath)) {
            fullPath += "/";
        }
        var nativeURL = result.nativeURL;
        // add trailing slash if it is missing
        if (!/\/$/.test(nativeURL)) {
            nativeURL += "/";
        }
        var entry = new DirectoryEntry(result.name, fullPath, fs, nativeURL);
        successCallback(entry);
    };
{code}

Then it would be fixed everywhere ...

> DirectoryEntry.toURL() has a trailing slash on iOS but not Android
> ------------------------------------------------------------------
>
>                 Key: CB-6571
>                 URL: https://issues.apache.org/jira/browse/CB-6571
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin File
>            Reporter: Andrew Grieve
>            Assignee: Andrew Grieve
>            Priority: Minor
>
> We should be consistent with this and always have directories end with at /.



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

Reply via email to