You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/03/21 14:43:25 UTC

[jira] [Commented] (CB-10317) Cannot access entries of folder whose name begins with a hash symbol.

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

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

GitHub user dhams opened a pull request:

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

    CB-10317 Encoded # in uri parse

    If we use # in folder name or file name Uri is not able parse that path as of now.
    
    As Uri class not parse # symbol (Uri class reserved that # as fragment identification so ) I have used encoded value of this symbol directly in `encodeHashUri `method.
     
    Method `parse` used in many places to parse the Uri path , I have encoded # in that method too in order to avoid code break. 

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

    $ git pull https://github.com/Accenture/cordova-plugin-file CB-10317

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

    https://github.com/apache/cordova-plugin-file/pull/172.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 #172
    
----
commit 585b9523a475ca5728023b16b6adef62aa569491
Author: Sharma <dh...@accenture.com>
Date:   2016-03-21T13:28:05Z

    Encoded # in uri parse

----


> Cannot access entries of folder whose name begins with a hash symbol.
> ---------------------------------------------------------------------
>
>                 Key: CB-10317
>                 URL: https://issues.apache.org/jira/browse/CB-10317
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin File
>    Affects Versions: 3.5.0
>         Environment: cordova-plugin-file
> Android 5
> Sony Xperia z2
>            Reporter: Adam Thomas
>            Priority: Minor
>              Labels: android, triaged
>
> File Plugin [version 3.0.0]
> I am trying to access a folder which happens to begin with a hash/pound symbol, e.g. '#folder'.
> If you try to access this via resolveLocalFileSystemURL(), I am returned a DirectoryEntry which appears to have the correct path. However, calling createReader() and readEntries() on this returns the files/directories for the directory above (including #folder itself) and not those that are actually in #folder. Presumably, something is going on with the fact that in a URL, anything after a hash symbol is a fragment part. But if this is the case, how do I properly access the entries of this folder? I have tried encoding the symbol with '%23' or '\%23' to no positive affect.
> I have tested this on Android. Currently unknown if this happens on iOS or other platforms.



--
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