Skip to content

Commit 995270e

Browse files
committed
CB-4514: Making DirectoryCopy Recursive
1 parent c242926 commit 995270e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/android/FileUtils.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -487,12 +487,13 @@ private JSONObject copyDirectory(File srcDir, File destinationDir) throws JSONEx
487487
throw new NoModificationAllowedException("Couldn't create the destination directory");
488488
}
489489
}
490+
490491

491492
for (File file : srcDir.listFiles()) {
493+
File destination = new File(destinationDir.getAbsoluteFile() + File.separator + file.getName());
492494
if (file.isDirectory()) {
493-
copyDirectory(file, destinationDir);
495+
copyDirectory(file, destination);
494496
} else {
495-
File destination = new File(destinationDir.getAbsoluteFile() + File.separator + file.getName());
496497
copyFile(file, destination);
497498
}
498499
}

0 commit comments

Comments
 (0)