You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by jcesarmobile <gi...@git.apache.org> on 2014/06/04 20:04:40 UTC
[GitHub] cordova-plugin-file pull request: fix for CB-6872
GitHub user jcesarmobile opened a pull request:
https://github.com/apache/cordova-plugin-file/pull/50
fix for CB-6872
This Pull Request fix CB-6872
the free space available wasn't returning the right value, so when you request the file system with a high value it fails with QUOTA_EXCEEDED_ERR
https://issues.apache.org/jira/browse/CB-6872
var requestBytes = 300 * 1024 * 1024; // 300MB
window.requestFileSystem(LocalFileSystem.PERSISTENT, requestBytes, function(fs) {
alert("success");
}, function (e) {
// error callback
alert("error");
});
This code was failing on my ipod touch 32GB with 7+GB free, and now I can request the 7GB
The problem is, checking the free space doesn't return the actual available free space when you use the root path "/",
you have to use another path instead, like self.rootDocsPath (documents folder path) to get the actual free available space. I tried some other paths and all of them worked ("/var", "/var/mobile/") but used self.rootDocsPath because it was already declared on the code so I didn't have to hardcode a path.
With paths like "/", "/etc" it returns the same wrong value.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/jcesarmobile/cordova-plugin-file master
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/cordova-plugin-file/pull/50.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #50
----
commit e551b78a181e2d34d8bc9fada98027e9728d9b26
Author: Julio CeĢsar <jc...@gmail.com>
Date: 2014-06-04T17:48:52Z
changed fullPath to self.rootDocsPath
checking the free space doesn't return the actual available free space,
you have to use another path instead, like self.rootDocsPath
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cordova-plugin-file pull request: fix for CB-6872
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/cordova-plugin-file/pull/50
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---