1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-11-02 08:25:02 -04:00

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

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)) {