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:44 UTC
[18/48] js commit: changed around how temporary shuold point to
regular appDirs also added some comments about freeSpaceForRoot
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 <ti...@nitobi.com>
Authored: Wed May 30 17:19:23 2012 -0700
Committer: Tim Kim <ti...@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));
}