cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhigg...@apache.org
Subject [3/4] git commit: CB-7167 [BlackBerry10] Add directory support to getFileMetadata
Date Mon, 21 Jul 2014 19:50:24 GMT
CB-7167 [BlackBerry10] Add directory support to getFileMetadata


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/commit/6b099505
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/tree/6b099505
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/diff/6b099505

Branch: refs/heads/master
Commit: 6b099505d7571abc10411faa39e1e592a441d1b4
Parents: d1ab0d9
Author: Bryan Higgins <bhiggins@blackberry.com>
Authored: Fri Jul 18 11:30:00 2014 -0400
Committer: Bryan Higgins <bhiggins@blackberry.com>
Committed: Fri Jul 18 14:16:45 2014 -0400

----------------------------------------------------------------------
 www/blackberry10/getFileMetadata.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/blob/6b099505/www/blackberry10/getFileMetadata.js
----------------------------------------------------------------------
diff --git a/www/blackberry10/getFileMetadata.js b/www/blackberry10/getFileMetadata.js
index 30b256c..dd3c1a5 100644
--- a/www/blackberry10/getFileMetadata.js
+++ b/www/blackberry10/getFileMetadata.js
@@ -55,7 +55,11 @@ module.exports = function (success, fail, args) {
         };
     resolve(function (entry) {
         requestAnimationFrame(function () {
-            entry.nativeEntry.file(onSuccess, onFail);
+            if (entry.nativeEntry.file) {
+                entry.nativeEntry.file(onSuccess, onFail);
+            } else {
+                entry.nativeEntry.getMetadata(onSuccess, onFail);
+            }
         });
     }, onFail, [uri]);
 };


Mime
View raw message