commit 7a33c3ed9cb1fa39b3f50e6540ca045522b46944 Author: iwakeh iwakeh@torproject.org Date: Thu Oct 27 18:13:36 2016 +0200
Prevent one descriptor type download from deleting the others, by grouping them according to marker and host. --- src/main/java/org/torproject/collector/sync/SyncManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/main/java/org/torproject/collector/sync/SyncManager.java b/src/main/java/org/torproject/collector/sync/SyncManager.java index ab7d4b6..3996a2e 100644 --- a/src/main/java/org/torproject/collector/sync/SyncManager.java +++ b/src/main/java/org/torproject/collector/sync/SyncManager.java @@ -52,7 +52,8 @@ public class SyncManager { DescriptorCollector descriptorCollector = new DescriptorIndexCollector(); for (URL source : sources) { try { - File storage = new File(basePath.toFile(), source.getHost()); + File storage = new File(basePath.toFile(), + marker + "-" + source.getHost()); storage.mkdirs(); log.info("Collecting {} from {} ...", marker, source.getHost()); descriptorCollector.collectDescriptors(source.toString(),
tor-commits@lists.torproject.org