`filebot -clear-cache` has been disabled due to abuse.

This commit is contained in:
Reinhard Pointner 2016-06-12 18:16:18 +08:00
parent b8d5f7edee
commit 3258c83cfd
1 changed files with 8 additions and 1 deletions

View File

@ -77,12 +77,19 @@ public class Main {
}
if (args.clearCache() || args.clearUserData()) {
// clear cache must be called manually
if (System.console() == null) {
System.err.println("`filebot -clear-cache` has been disabled due to abuse.");
System.exit(-1);
}
// clear persistent user preferences
if (args.clearUserData()) {
System.out.println("Reset preferences");
Settings.forPackage(Main.class).clear();
}
// clear preferences and cache
// clear caches
if (args.clearCache()) {
System.out.println("Clear cache");
for (File folder : getChildren(ApplicationFolder.Cache.getCanonicalFile(), FOLDERS)) {