From 385373daef503d9f63e1586eb11d049f9ec21656 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Fri, 22 Nov 2013 08:54:40 +0000 Subject: [PATCH] * make -clear-cache delete all APPDATA temp folders --- source/net/sourceforge/filebot/Main.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/net/sourceforge/filebot/Main.java b/source/net/sourceforge/filebot/Main.java index 2ac3f915..bc235716 100644 --- a/source/net/sourceforge/filebot/Main.java +++ b/source/net/sourceforge/filebot/Main.java @@ -97,10 +97,10 @@ public class Main { if (args.clearCache()) { // clear preferences and cache System.out.println("Clear cache and temporary files"); - for (File cache : getApplicationFolder().listFiles(FOLDERS)) { - if (matches("cache|temp|grape", cache.getName())) { - for (File it : cache.listFiles()) { - delete(it); + for (File folder : getApplicationFolder().getAbsoluteFile().listFiles(FOLDERS)) { + if (matches("cache|temp|grape|logs", folder.getName())) { + if (delete(folder)) { + System.out.println("* Delete " + folder); } } }