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

Benjamin de Dardel commented on CB-10883:
-----------------------------------------

With this code:

_
{code:java}
window.resolveLocalFileSystemURL(path, function (entry) {
    var dEntry = entry as DirectoryEntry;
    var dirReader = dEntry.createReader();
    dirReader.readEntries( function(entryList) {
        entryList.forEach( function ( entr ) {
                // ...
        } );
    }, function (error) { console.error("readEntries error: ", error); } );
}, function (error) { console.error("resolveLocalFileSystemURI error: ", 
error); });
{code}
_

On Android 5, resolveLocalFileSystemURL('file:///storage') returns 
'/storage/<theGoodSdCard>'
On Android 6, resolveLocalFileSystemURL('file:///storage') returns 
'/storage/emulated' + '/storage/self'

But the result shoud be something like that: '*/storage/emulated/0*'
Indeed, resolveLocalFileSystemURL('/storage/emulated/0') returns my sdcard 
files and directories ! 

Any ideas how to resolve / bypass this issue ?

> resolveLocalFileSystemURL cordova.file.externalRootDirectory is fail on 
> android 6.0
> -----------------------------------------------------------------------------------
>
>                 Key: CB-10883
>                 URL: https://issues.apache.org/jira/browse/CB-10883
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: cordova-plugin-file
>         Environment: cordova 6.0 
> cordova-plugin-file 4.1.2-dev
> device android 6.0
>            Reporter: junyuz
>            Assignee: Joe Bowser
>              Labels: Android, patch
>   Original Estimate: 12h
>  Remaining Estimate: 12h
>
> window.resolveLocalFileSystemURL(cordova.file.externalRootDirectory, 
> function(dirEntry) {
>           var directoryReader = dirEntry.createReader();
>           directoryReader.readEntries(function(entries) {}
> }
> on android6.0 entries.length==0
> but on android4.x 5.x  is run good



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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

Reply via email to