cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shazron Abdullah (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CB-6777) window.requestFileSystem(LocalFileSystem.TEMPORARY returns "/"
Date Thu, 29 May 2014 19:03:04 GMT

     [ https://issues.apache.org/jira/browse/CB-6777?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Shazron Abdullah updated CB-6777:
---------------------------------

    Component/s:     (was: Android)
                 Plugin File
    Environment: Android

> window.requestFileSystem(LocalFileSystem.TEMPORARY returns "/"
> --------------------------------------------------------------
>
>                 Key: CB-6777
>                 URL: https://issues.apache.org/jira/browse/CB-6777
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin File
>    Affects Versions: 3.5.0
>         Environment: Android
>            Reporter: Axel Nennker
>
> In the code below I get a 
> java.io.FileNotFoundException: /tmpfile.tmp: open failed: EROFS (Read-only file system)

> because the request for a temporary filesystem returns "/".
> {code}
> 60           window.requestFileSystem(LocalFileSystem.TEMPORARY, 0, function(fs){
> 61 for (var p in fs.root) {
> 62   Framework.util.LogUtil.i(this.$className, 'getImport() fs.root['+p+'] =' + fs.root[p]);-
> 63 }
> 64               fs.root.getFile("tmpfile.tmp", {create: true, exclusive: false},
> 65                 function(entry){
> 66                   var fileTransfer = new FileTransfer();
> 67                   fileTransfer.download(
> 68                           aFile,
> 69                           entry.fullPath,
> 70                           function(entry) {
> 71                               console.log("download complete: " + entry.fullPath);
> 72                               aSuccess(entry);
> 73                           },
> 74                           function(error) {
> 75                               console.log("error source " + error.source);
> 76                               console.log("error target " + error.target);
> 77                               console.log("error code " + error.code);
> 78                               aFail(error);
> 79                           },
> 80                           false,
> 81                           {
> 82                              headers: {
> 83                               'Content-Type': 'application/json'
> 84                              }
> 85                           }
> 86                   );
> 87               }, function(error){
> 88                 Framework.util.LogUtil.e(this.$className, 'getImport() download error
=' + error);-
> 89                 aFail(error);
> 90               });
> 91           }, null);
> 92 
> 93         },
> {code}
> I/Web Console(22297): [I]  :: getImport() fs.root[isFile] =false:37
> I/Web Console(22297): [I]  :: getImport() fs.root[isDirectory] =true:37
> I/Web Console(22297): [I]  :: getImport() fs.root[name] =:37
> I/Web Console(22297): [I]  :: getImport() fs.root[fullPath] =/:37
> I/Web Console(22297): [I]  :: getImport() fs.root[filesystem] =[object Object]:37
> I/Web Console(22297): [I]  :: getImport() fs.root[nativeURL] =null:37
> This happened after I updated the file and the file-transfer plugins in my project. It
worked with the old versions (about one year older).
> Not sure what the temporary filesystem should be on Android but "/" is wrong.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message