mirror of
https://github.com/mitb-archive/filebot
synced 2024-12-24 08:48:51 -05:00
Allow -clear-prefs
This commit is contained in:
parent
f32b98480c
commit
ae1e3e640a
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user