1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-23 16:28:51 -05:00

Allow -clear-prefs

This commit is contained in:
Reinhard Pointner 2017-03-24 21:57:00 +08:00
parent f32b98480c
commit ae1e3e640a

View File

@ -71,12 +71,6 @@ public class Main {
} }
if (args.clearCache() || args.clearUserData()) { if (args.clearCache() || args.clearUserData()) {
// clear cache must be called manually
if (System.console() == null) {
log.severe("`filebot -clear-cache` has been disabled due to abuse.");
System.exit(1);
}
// clear persistent user preferences // clear persistent user preferences
if (args.clearUserData()) { if (args.clearUserData()) {
log.info("Reset preferences"); log.info("Reset preferences");
@ -85,6 +79,12 @@ public class Main {
// clear caches // clear caches
if (args.clearCache()) { if (args.clearCache()) {
// clear cache must be called manually
if (System.console() == null) {
log.severe("`filebot -clear-cache` has been disabled due to abuse.");
System.exit(1);
}
log.info("Clear cache"); log.info("Clear cache");
for (File folder : getChildren(ApplicationFolder.Cache.get(), FOLDERS)) { for (File folder : getChildren(ApplicationFolder.Cache.get(), FOLDERS)) {
log.fine("* Delete " + folder); log.fine("* Delete " + folder);