incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tim...@apache.org
Subject [18/48] js commit: changed around how temporary shuold point to regular appDirs also added some comments about freeSpaceForRoot
Date Thu, 07 Jun 2012 20:40:44 GMT
changed around how temporary shuold point to regular appDirs also added some comments about
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/4c8685b6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/tree/4c8685b6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/diff/4c8685b6

Branch: refs/heads/master
Commit: 4c8685b6f394f832479b469f011a44f0ceb71649
Parents: fca2935
Author: Tim Kim <tim.kim@nitobi.com>
Authored: Wed May 30 17:19:23 2012 -0700
Committer: Tim Kim <tim.kim@nitobi.com>
Committed: Thu Jun 7 13:40:23 2012 -0700

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


http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/4c8685b6/lib/playbook/plugin/playbook/requestFileSystem.js
----------------------------------------------------------------------
diff --git a/lib/playbook/plugin/playbook/requestFileSystem.js b/lib/playbook/plugin/playbook/requestFileSystem.js
index 9d10a73..db92755 100644
--- a/lib/playbook/plugin/playbook/requestFileSystem.js
+++ b/lib/playbook/plugin/playbook/requestFileSystem.js
@@ -33,10 +33,19 @@ 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){
+            fail(FileError.QUOTA_EXCEEDED_ERR);
+        }
+        */
+        
         var theFileSystem;
         try{
+            // is there a way to get space for the app that doesn't point to the appDirs
folder?
             if(type==LocalFileSystem.TEMPORARY){
-                theFileSystem = new FileSystem('temporary', new DirectoryEntry('root', 'file:///SDCard'));
+                theFileSystem = new FileSystem('temporary', new DirectoryEntry('root', blackberry.io.dir.appDirs.app.storage.path));
             }else if(type==LocalFileSystem.PERSISTENT){
                 theFileSystem = new FileSystem('persistent', new DirectoryEntry('root', blackberry.io.dir.appDirs.app.storage.path));
             }


Mime
View raw message