You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2014/02/11 00:22:56 UTC

[30/50] git commit: Add backwards-compatibility shim for file-transfer

Add backwards-compatibility shim for file-transfer

Since file-transfer constructs its own FileEntry objects, we cant change the return values of getEntry so much.


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/ca3813ca
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/tree/ca3813ca
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/diff/ca3813ca

Branch: refs/heads/master
Commit: ca3813caa1612ef76bf451da645c2f9f90ce0193
Parents: 5268af3
Author: Ian Clelland <ic...@chromium.org>
Authored: Wed Jan 22 23:36:47 2014 -0500
Committer: Ian Clelland <ic...@chromium.org>
Committed: Thu Jan 23 09:00:54 2014 -0500

----------------------------------------------------------------------
 src/android/Filesystem.java      | 2 ++
 src/android/LocalFilesystem.java | 2 ++
 2 files changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/blob/ca3813ca/src/android/Filesystem.java
----------------------------------------------------------------------
diff --git a/src/android/Filesystem.java b/src/android/Filesystem.java
index 560cc85..904f728 100644
--- a/src/android/Filesystem.java
+++ b/src/android/Filesystem.java
@@ -33,6 +33,8 @@ public abstract class Filesystem {
         // The file system can't be specified, as it would lead to an infinite loop,
         // but the filesystem name can be.
         entry.put("filesystemName", fsName);
+        // Backwards compatibility
+        entry.put("filesystem", "temporary".equals(fsName) ? 0 : 1);
 
         return entry;
 

http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/blob/ca3813ca/src/android/LocalFilesystem.java
----------------------------------------------------------------------
diff --git a/src/android/LocalFilesystem.java b/src/android/LocalFilesystem.java
index 0e46d1e..ebcbaec 100644
--- a/src/android/LocalFilesystem.java
+++ b/src/android/LocalFilesystem.java
@@ -84,6 +84,8 @@ public class LocalFilesystem extends Filesystem {
     	  // But we can specify the name of the FS, and the rest can be reconstructed
     	  // in JS.
     	  entry.put("filesystemName", inputURL.filesystemName);
+    	  // Backwards compatibility
+    	  entry.put("filesystem", "temporary".equals(name) ? 0 : 1);
           return entry;
       } catch (JSONException e) {
     	  throw new IOException();