[tor-commits] [collector/master] Fix path for storing exit list.

karsten at torproject.org karsten at torproject.org
Fri Aug 5 10:06:52 UTC 2016


commit 9d54f0e8d34de1aba95d06f318e2e260bc40baa5
Author: Karsten Loesing <karsten.loesing at gmx.net>
Date:   Fri Aug 5 11:26:42 2016 +0200

    Fix path for storing exit list.
    
    The earlier code would store exit lists to paths like:
    
      `out/exit-lists2016/08/05/2016-08-05-09-03-43`
    
    Found while testing #19840.
---
 .../java/org/torproject/collector/exitlists/ExitListDownloader.java  | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/torproject/collector/exitlists/ExitListDownloader.java b/src/main/java/org/torproject/collector/exitlists/ExitListDownloader.java
index 9c02032..5ba8ea3 100644
--- a/src/main/java/org/torproject/collector/exitlists/ExitListDownloader.java
+++ b/src/main/java/org/torproject/collector/exitlists/ExitListDownloader.java
@@ -93,8 +93,9 @@ public class ExitListDownloader extends CollecTorMain {
     SimpleDateFormat tarballFormat =
         new SimpleDateFormat("yyyy/MM/dd/yyyy-MM-dd-HH-mm-ss");
     tarballFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
-    File tarballFile = new File(config.getPath(Key.ExitlistOutputDirectory)
-        + tarballFormat.format(downloadedDate));
+    File tarballFile = new File(
+        config.getPath(Key.ExitlistOutputDirectory).toFile(),
+        tarballFormat.format(downloadedDate));
 
     long maxScanMillis = 0L;
     try {



More information about the tor-commits mailing list