cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bows...@apache.org
Subject git commit: CB-4514: Making DirectoryCopy Recursive
Date Wed, 04 Sep 2013 22:39:23 GMT
Updated Branches:
  refs/heads/dev c2429260f -> 995270e1f


CB-4514: Making DirectoryCopy Recursive


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

Branch: refs/heads/dev
Commit: 995270e1f1078cf313aa1d17a09472b399f4f909
Parents: c242926
Author: Joe Bowser <bowserj@apache.org>
Authored: Wed Sep 4 15:39:13 2013 -0700
Committer: Joe Bowser <bowserj@apache.org>
Committed: Wed Sep 4 15:39:13 2013 -0700

----------------------------------------------------------------------
 src/android/FileUtils.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/blob/995270e1/src/android/FileUtils.java
----------------------------------------------------------------------
diff --git a/src/android/FileUtils.java b/src/android/FileUtils.java
index 892c12c..1c99c38 100755
--- a/src/android/FileUtils.java
+++ b/src/android/FileUtils.java
@@ -487,12 +487,13 @@ public class FileUtils extends CordovaPlugin {
                 throw new NoModificationAllowedException("Couldn't create the destination
directory");
             }
         }
+        
 
         for (File file : srcDir.listFiles()) {
+            File destination = new File(destinationDir.getAbsoluteFile() + File.separator
+ file.getName());
             if (file.isDirectory()) {
-                copyDirectory(file, destinationDir);
+                copyDirectory(file, destination);
             } else {
-                File destination = new File(destinationDir.getAbsoluteFile() + File.separator
+ file.getName());
                 copyFile(file, destination);
             }
         }


Mime
View raw message