* make -clear-cache delete all APPDATA temp folders

This commit is contained in:
Reinhard Pointner 2013-11-22 08:54:40 +00:00
parent e1c8e8d17b
commit 385373daef
1 changed files with 4 additions and 4 deletions

View File

@ -97,10 +97,10 @@ public class Main {
if (args.clearCache()) { if (args.clearCache()) {
// clear preferences and cache // clear preferences and cache
System.out.println("Clear cache and temporary files"); System.out.println("Clear cache and temporary files");
for (File cache : getApplicationFolder().listFiles(FOLDERS)) { for (File folder : getApplicationFolder().getAbsoluteFile().listFiles(FOLDERS)) {
if (matches("cache|temp|grape", cache.getName())) { if (matches("cache|temp|grape|logs", folder.getName())) {
for (File it : cache.listFiles()) { if (delete(folder)) {
delete(it); System.out.println("* Delete " + folder);
} }
} }
} }