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 2015/11/04 00:07:27 UTC
[jira] [Commented] (CB-9752) getDirectory fails on valid directory
with assets filesystem
[ https://issues.apache.org/jira/browse/CB-9752?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14988390#comment-14988390 ]
ASF GitHub Bot commented on CB-9752:
------------------------------------
Github user riknoll commented on the pull request:
https://github.com/apache/cordova-plugin-file/pull/144#issuecomment-153517264
LGTM. Tested on an Android 6.0 device and on an Android 5.1.1 emulator and ran mobilespec. I'll merge this in at the end of the day.
> getDirectory fails on valid directory with assets filesystem
> ------------------------------------------------------------
>
> Key: CB-9752
> URL: https://issues.apache.org/jira/browse/CB-9752
> Project: Apache Cordova
> Issue Type: Bug
> Components: Android, Plugin File
> Environment: cordova 5.3.3
> cordova android 4.0.0
> cordova-plugin-file 2.0.0
> *** using build-extras.gradle to speed up lookups (as per README.md for plugin) ***
> Reporter: Denis Babineau
> Assignee: Jason Ginchereau
>
> The following JS snippet fails with "failed to get www directory":
> window.resolveLocalFileSystemURL(cordova.file.applicationDirectory, function(appDir) {
> appDir.getDirectory('www', {create:false}, function(wwwDir) {
> console.log("success!");
> }, function() {
> console.log("failed to get www directory");
> });
> }, function() {
> console.log("Failed to get application directory");
> });
> I narrowed it down to AssetFilesystem.java's listAssets() method called from isDirectory() which returns the "new String[0];" (assetPath = 'www/' in this method) which in turn causes isDirectory() to return false.
--
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