From f96f7cc12471465de6fb3fe4f17d5d4c642f22ac Mon Sep 17 00:00:00 2001 From: Fabian-G Date: Sun, 14 Feb 2016 17:09:45 +0100 Subject: [PATCH] Added a command line option to avoid creation of properties file --- src/main/java/com/rarchives/ripme/App.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/rarchives/ripme/App.java b/src/main/java/com/rarchives/ripme/App.java index 36376d3f..5544b12e 100644 --- a/src/main/java/com/rarchives/ripme/App.java +++ b/src/main/java/com/rarchives/ripme/App.java @@ -147,7 +147,9 @@ public class App { if (!history.contains(url.toExternalForm())) { history.add(url.toExternalForm()); Utils.setConfigList("download.history", Arrays.asList(history.toArray())); - Utils.saveConfig(); + if(!cl.hasOption("n")) { + Utils.saveConfig(); + } } } catch (MalformedURLException e) { logger.error("[!] Given URL is not valid. Expected URL format is http://domain.com/..."); @@ -171,6 +173,7 @@ public class App { opts.addOption("D", "nosaveorder", false, "Don't save order of images"); opts.addOption("4", "skip404", false, "Don't retry after a 404 (not found) error"); opts.addOption("l", "ripsdirectory", true, "Rips Directory (Default: ./rips)"); + opts.addOption("n", "no-prop-file", false, "Do not create properties file."); return opts; }