--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
This commit is contained in:
abraunegg 2022-05-13 11:06:59 +10:00 committed by GitHub
parent b7aede6d30
commit ee2c14c6cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -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");