[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [collector/master] Prevent one descriptor type download from deleting the others,



commit 7a33c3ed9cb1fa39b3f50e6540ca045522b46944
Author: iwakeh <iwakeh@xxxxxxxxxxxxxx>
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 mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits