From 81dd6f373afa9a0ea1af222ad900681ca632e890 Mon Sep 17 00:00:00 2001 From: Karsten Loesing Date: Sat, 14 Jan 2012 11:29:45 +0100 Subject: [PATCH] Always copy files to rsync/ and keep last modified time. --- src/org/torproject/ernie/db/RsyncDataProvider.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/org/torproject/ernie/db/RsyncDataProvider.java b/src/org/torproject/ernie/db/RsyncDataProvider.java index 1f0d68f..455d6dd 100644 --- a/src/org/torproject/ernie/db/RsyncDataProvider.java +++ b/src/org/torproject/ernie/db/RsyncDataProvider.java @@ -123,9 +123,6 @@ public class RsyncDataProvider { } private void copyFile(File from, File to) { - if (to.exists()) { - return; - } try { to.getParentFile().mkdirs(); FileInputStream fis = new FileInputStream(from); @@ -138,6 +135,7 @@ public class RsyncDataProvider { } bis.close(); fos.close(); + to.setLastModified(from.lastModified()); } catch (IOException e) { e.printStackTrace(); }