diff --git a/src/main.d b/src/main.d index 80692180..bb9627e7 100644 --- a/src/main.d +++ b/src/main.d @@ -402,7 +402,6 @@ int main(string[] args) // if --synchronize or --monitor not passed in, exit & display help auto performSyncOK = false; - if (synchronize || monitor) { performSyncOK = true; } @@ -420,6 +419,14 @@ int main(string[] args) return EXIT_FAILURE; } + // if --synchronize && --monitor passed in, exit & display help as these conflict with each other + if (synchronize && monitor) { + writeln("\nERROR: --synchronize and --monitor cannot be used together\n"); + writeln("Refer to --help to determine which command option you should use.\n"); + oneDrive.http.shutdown(); + return EXIT_FAILURE; + } + // Initialize the item database log.vlog("Opening the item database ..."); if (!dryRun) {