From ee2c14c6cccc1df78717a48684d726e879280236 Mon Sep 17 00:00:00 2001 From: abraunegg Date: Fri, 13 May 2022 11:06:59 +1000 Subject: [PATCH] --upload-only and --download-only are mutually exclusive and cannot be used together (#1959) * --upload-only and --download-only are mutually exclusive and cannot be used together --- src/main.d | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main.d b/src/main.d index 15af0bc5..55849243 100644 --- a/src/main.d +++ b/src/main.d @@ -681,6 +681,13 @@ int main(string[] args) return EXIT_SUCCESS; } + // --upload-only and --download-only are mutually exclusive and cannot be used together + if ((cfg.getValueBool("upload_only")) && (cfg.getValueBool("download_only"))) { + // both cannot be true at the same time + log.error("ERROR: --upload-only and --download-only are mutually exclusive and cannot be used together.\n"); + return EXIT_FAILURE; + } + // Handle --resync to remove local files if (cfg.getValueBool("resync")) { log.vdebug("--resync requested");