Return-Path: X-Original-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DFA46DCCB for ; Mon, 13 Aug 2012 22:18:39 +0000 (UTC) Received: (qmail 29181 invoked by uid 500); 13 Aug 2012 22:18:39 -0000 Delivered-To: apmail-incubator-callback-dev-archive@incubator.apache.org Received: (qmail 29142 invoked by uid 500); 13 Aug 2012 22:18:39 -0000 Mailing-List: contact callback-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@incubator.apache.org Delivered-To: mailing list callback-dev@incubator.apache.org Received: (qmail 29050 invoked by uid 99); 13 Aug 2012 22:18:39 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Aug 2012 22:18:39 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 752F42C5AE5 for ; Mon, 13 Aug 2012 22:18:38 +0000 (UTC) Date: Tue, 14 Aug 2012 09:18:38 +1100 (NCT) From: "Simon MacDonald (JIRA)" To: callback-dev@incubator.apache.org Message-ID: <965112726.4614.1344896318480.JavaMail.jiratomcat@arcas> In-Reply-To: <95266450.23091.1339946022348.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Comment Edited] (CB-930) DirectoryReader creates null error code for inaccessible directory MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CB-930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13433649#comment-13433649 ] Simon MacDonald edited comment on CB-930 at 8/14/12 9:17 AM: ------------------------------------------------------------- Possible fix for the issue. Need someone who can reproduce it to test. Before I add a file to the list returned by readEntries I make sure it is in fact readable. was (Author: macdonst): Possible fix for the issue. Need someone who can reproduce it to test. > 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 > Attachments: cordova-2.0.0.jar, index.js, logcat.txt > > > 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