cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jcesarmobile <...@git.apache.org>
Subject [GitHub] cordova-plugin-file pull request: fix for CB-6872
Date Wed, 04 Jun 2014 18:04:40 GMT
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 <jcesarmobile@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.
---

Mime
View raw message