You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by bo...@apache.org on 2013/09/05 00:39:23 UTC
git commit: CB-4514: Making DirectoryCopy Recursive
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 <bo...@apache.org>
Authored: Wed Sep 4 15:39:13 2013 -0700
Committer: Joe Bowser <bo...@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);
}
}