commit 6d4363afc261d99ede9d4bc1bba59dd5dfab4a1b Author: Karsten Loesing karsten.loesing@gmx.net Date: Thu Aug 9 11:03:16 2012 +0200
Handle edge case when initializing webstats processor.
Previously, we'd break without a stats/full/ directory. There are edge cases when we don't have such a directory yet. --- src/org/torproject/webstats/Main.java | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/org/torproject/webstats/Main.java b/src/org/torproject/webstats/Main.java index 7f1afe1..1aa02d4 100644 --- a/src/org/torproject/webstats/Main.java +++ b/src/org/torproject/webstats/Main.java @@ -500,7 +500,9 @@ public class Main { while (!fileNames.isEmpty()) { String fileName = fileNames.pop(); File fileOrDirectory = new File(fileName); - if (fileOrDirectory.isDirectory()) { + if (!fileOrDirectory.exists()) { + continue; + } else if (fileOrDirectory.isDirectory()) { for (File file : fileOrDirectory.listFiles()) { fileNames.add(fileName + "/" + file.getName()); }
tor-commits@lists.torproject.org