mirror of
https://github.com/abraunegg/onedrive
synced 2024-05-21 23:26:37 +02:00
Prevent use of --synchronize & --monitor together (#431)
* Prevent use of --synchronize & --monitor together
This commit is contained in:
parent
f5c3e7643d
commit
002f9b7aec
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue