incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon MacDonald (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-930) DirectoryReader creates null error code for inaccessible directory
Date Mon, 18 Jun 2012 14:17:43 GMT

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

Simon MacDonald commented on CB-930:
------------------------------------

I'm not quite sure how to get this directory on my sd card any ideas? Also, it seems weird
that there would be an error reading the directory on sd card as there are no permissions
on the sd card. Can you give us some more info in order to figure out how to fix it?
                
> DirectoryReader creates null error code for inaccessible directory
> ------------------------------------------------------------------
>
>                 Key: CB-930
>                 URL: https://issues.apache.org/jira/browse/CB-930
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 1.8.1
>            Reporter: Andreas Sommer
>            Assignee: Simon MacDonald
>
> The error callback should follow the FileError specification which defines e.g. SECURITY_ERR=2
as error code. When I try to access file:///mnt/sdcard/.android_secure which is protected
by the OS, I get the error code null.
> Example to reproduce (using Android 4.0 emulator):
> document.addEventListener("deviceready", function() {
>     window.requestFileSystem(
>         LocalFileSystem.PERSISTENT,
>         0,
>         function(fileSystem) {
>             var reader = fileSystem.root.createReader().readEntries(function(entries)
{
>                 for(var i = 0; i < entries.length; ++i)
>                     if(/\.android_secure$/.test(entries[i].fullPath))
>                         entries[i].createReader().readEntries(function(entries) {
>                             for(var i = 0; i < entries.length; ++i) {
>                                 if(entries[i].isDirectory)
>                                     console.log("dir " + entries[i].fullPath)
>                                 else
>                                     console.log("file " + entries[i].fullPath)
>                             }
>                         }, function(err) {
>                             //////////////////////////////////////
>                             // The following error occurs and the JSON representation
is {"code":null}
>                             //////////////////////////////////////
>                             console.log("Failed to read .android_secure directory (error
code " + err.code  +")")
>                             console.log("JSON error: " + Ext.JSON.encode(err))
>                             //////////////////////////////////////
>                         })
>             }, function(err) {
>                 console.log("Failed to read directory entries of " + entry.fullPath +
" (error code " + err.code  +")")
>             })
>         },
>         function(err) {
>             alert("Failed to read file system (error code " + err.code  +")")
>         })
> }, false)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message