[ https://issues.apache.org/jira/browse/CB-6777?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrew Grieve resolved CB-6777. ------------------------------- Resolution: Not a Problem As of 1.0 of the plugin, it's been brought more in-line with the spec. Paths are now relative to the FS root. If you want to get at the actual path, then use toURL() > window.requestFileSystem(LocalFileSystem.TEMPORARY returns "/" > -------------------------------------------------------------- > > Key: CB-6777 > URL: https://issues.apache.org/jira/browse/CB-6777 > Project: Apache Cordova > Issue Type: Bug > Components: Android > Affects Versions: 3.5.0 > 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 "/". > 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 }, > 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)