mirror of
https://github.com/abraunegg/onedrive
synced 2024-06-03 14:32:24 +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
|
// if --synchronize or --monitor not passed in, exit & display help
|
||||||
auto performSyncOK = false;
|
auto performSyncOK = false;
|
||||||
|
|
||||||
if (synchronize || monitor) {
|
if (synchronize || monitor) {
|
||||||
performSyncOK = true;
|
performSyncOK = true;
|
||||||
}
|
}
|
||||||
|
@ -420,6 +419,14 @@ int main(string[] args)
|
||||||
return EXIT_FAILURE;
|
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
|
// Initialize the item database
|
||||||
log.vlog("Opening the item database ...");
|
log.vlog("Opening the item database ...");
|
||||||
if (!dryRun) {
|
if (!dryRun) {
|
||||||
|
|
Loading…
Reference in a new issue