You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ti...@apache.org on 2012/06/07 22:40:43 UTC

[8/48] js commit: Added in size restrictions for freeSpaceForRoot

Added in size restrictions for freeSpaceForRoot


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/commit/cdc172b2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/tree/cdc172b2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/diff/cdc172b2

Branch: refs/heads/master
Commit: cdc172b21d52deaf4554a7ec138a3340e050e4fb
Parents: cabb209
Author: Tim Kim <ti...@nitobi.com>
Authored: Tue Jun 5 12:07:26 2012 -0700
Committer: Tim Kim <ti...@nitobi.com>
Committed: Thu Jun 7 13:40:24 2012 -0700

----------------------------------------------------------------------
 lib/playbook/plugin/playbook/requestFileSystem.js |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/cdc172b2/lib/playbook/plugin/playbook/requestFileSystem.js
----------------------------------------------------------------------
diff --git a/lib/playbook/plugin/playbook/requestFileSystem.js b/lib/playbook/plugin/playbook/requestFileSystem.js
index dee1841..1b4bf95 100644
--- a/lib/playbook/plugin/playbook/requestFileSystem.js
+++ b/lib/playbook/plugin/playbook/requestFileSystem.js
@@ -33,13 +33,14 @@ var requestFileSystem = function(type, size, successCallback, errorCallback) {
             }
         };
 
-        // blackberry.io.dir.getFreeSpaceForRoot is undefined despite being documented otherwise
-        // no real way of checking for max file size at the moment it seems
-        /*
-        if(size>=1000000000000000){
+        // guessing the max file size is 2GB - 1 bytes?
+        // https://bdsc.webapps.blackberry.com/native/documentation/com.qnx.doc.neutrino.user_guide/topic/limits_filesystems.html
+
+        if(size>=2147483648){
             fail(FileError.QUOTA_EXCEEDED_ERR);
+            return;
         }
-        */
+
 
         var theFileSystem;
         try{