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

ASF GitHub Bot commented on CB-10577:
-------------------------------------

GitHub user jasongin opened a pull request:

    https://github.com/apache/cordova-plugin-file/pull/169

    CB-10577: Windows resolveLocalFileSystemURL should omit trailing slash for 
file

    The FileEntry constructor should remove any trailing slash from its path. 
This parallels the existing DirectoryEntry constructor code which adds a 
trailing slash if missing.
    
    This is actually not a Windows-specific fix, but it fixes a file plugin 
test case failure that was observed on Windows after I recently added that test 
case to validate an Android fix. Windows already invokes the correct 
FileEntry/DirEntry constructor based on the actual file/directory status of the 
path, so fixing the trailing slash is all that is needed.
    
    @riknoll or @rakatyal please review

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jasongin/cordova-plugin-file CB-10577a

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-plugin-file/pull/169.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #169
    
----
commit 2132bbf2d8bd1d45f500270b64f348f8ba001b75
Author: Jason Ginchereau <[email protected]>
Date:   2016-03-09T17:54:44Z

    CB-10577: Windows resolveLocalFileSystemURL should omit trailing slash for 
file

----


> Android plugin file: resolveLocalFileSystemURL produce incorrect value
> ----------------------------------------------------------------------
>
>                 Key: CB-10577
>                 URL: https://issues.apache.org/jira/browse/CB-10577
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin File
>            Reporter: vldmrrrr
>            Priority: Critical
>              Labels: android, triaged
>         Attachments: index.js
>
>
> On android resolveLocalFileSystemURL  sets isDirectory and isFile properties 
> based on argument URL having trailing slash, and not on actual object type. 
> See attached test program, which currently outputs the following:
>  cdvfile://localhost/temporary/tst is file
>  cdvfile://localhost/temporary/tst/ is directory
> Correct output shall be:
>  cdvfile://localhost/temporary/tst is directory
>  cdvfile://localhost/temporary/tst/ is directory



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to