Merge branch 'master' into fix-issue-1137

This commit is contained in:
abraunegg 2020-11-14 06:21:03 +11:00 committed by GitHub
commit 17d5f97cb0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View file

@ -282,8 +282,6 @@ final class Config
boolValues["monitor"] = false;
boolValues["synchronize"] = false;
boolValues["force"] = false;
boolValues["remove_source_files"] = false;
boolValues["skip_dir_strict_match"] = false;
boolValues["list_business_shared_folders"] = false;
// Application Startup option validation

View file

@ -509,6 +509,9 @@ int main(string[] args)
writeln("Config option 'min_notify_changes' = ", cfg.getValueLong("min_notify_changes"));
writeln("Config option 'log_dir' = ", cfg.getValueString("log_dir"));
writeln("Config option 'classify_as_big_delete' = ", cfg.getValueLong("classify_as_big_delete"));
writeln("Config option 'upload_only' = ", cfg.getValueBool("upload_only"));
writeln("Config option 'no_remote_delete' = ", cfg.getValueBool("no_remote_delete"));
writeln("Config option 'remove_source_files' = ", cfg.getValueBool("remove_source_files"));
// Is config option drive_id configured?
if (cfg.getValueString("drive_id") != ""){
@ -765,14 +768,18 @@ int main(string[] args)
// Do we need to configure specific --upload-only options?
if (cfg.getValueBool("upload_only")) {
// --upload-only was passed in or configured
log.log("Configuring uploadOnly flag to TRUE as --upload-only passed in or configured");
sync.setUploadOnly();
// was --no-remote-delete passed in or configured
if (cfg.getValueBool("no_remote_delete")) {
// Configure the noRemoteDelete flag
log.log("Configuring noRemoteDelete flag to TRUE as --no-remote-delete passed in or configured");
sync.setNoRemoteDelete();
}
// was --remove-source-files passed in or configured
if (cfg.getValueBool("remove_source_files")) {
// Configure the localDeleteAfterUpload flag
log.log("Configuring localDeleteAfterUpload flag to TRUE as --remove-source-files passed in or configured");
sync.setLocalDeleteAfterUpload();
}
}