commit ebc69a89e5fc7cbcf9eafc8fe6ea28ac9002e6e1 Author: Karsten Loesing karsten.loesing@gmx.net Date: Wed May 2 15:39:46 2012 +0200
Only copy files to rsync/ that have actually changed. --- src/org/torproject/ernie/db/RsyncDataProvider.java | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/src/org/torproject/ernie/db/RsyncDataProvider.java b/src/org/torproject/ernie/db/RsyncDataProvider.java index 2f2c1b4..6c0feae 100644 --- a/src/org/torproject/ernie/db/RsyncDataProvider.java +++ b/src/org/torproject/ernie/db/RsyncDataProvider.java @@ -163,6 +163,11 @@ public class RsyncDataProvider { }
private void copyFile(File from, File to) { + if (from.exists() && to.exists() && + from.lastModified() == to.lastModified() && + from.length() == to.length()) { + return; + } try { to.getParentFile().mkdirs(); FileInputStream fis = new FileInputStream(from);
tor-commits@lists.torproject.org