-clear-cache only deletes ehcache folders
This commit is contained in:
parent
62ec14757c
commit
b243a6df1a
|
@ -85,12 +85,14 @@ public class Main {
|
||||||
|
|
||||||
// clear preferences and cache
|
// clear preferences and cache
|
||||||
if (args.clearCache()) {
|
if (args.clearCache()) {
|
||||||
System.out.println("Clear cache and temporary files");
|
System.out.println("Clear cache");
|
||||||
for (File folder : getChildren(ApplicationFolder.AppData.getCanonicalFile(), FOLDERS)) {
|
for (File folder : getChildren(ApplicationFolder.Cache.getCanonicalFile(), FOLDERS)) {
|
||||||
System.out.println("* Delete " + folder);
|
if (delete(folder)) {
|
||||||
delete(folder);
|
System.out.println("* Delete " + folder);
|
||||||
|
} else {
|
||||||
|
System.out.println("* Failed to delete " + folder);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
CacheManager.getInstance().clearAll();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// just clear cache and/or settings and then exit
|
// just clear cache and/or settings and then exit
|
||||||
|
|
Loading…
Reference in New Issue