Fix --monitor when used with --download-only (#708)

* Fix --monitor when used with --download-only. This fixes the regression introduced in 12947d160f.
This commit is contained in:
Tudor Brindus 2019-10-30 23:59:44 -04:00 committed by abraunegg
parent df3fba1be0
commit 7ba59e0b1d

View file

@ -672,6 +672,7 @@ int main(string[] args)
signal(SIGTERM, &exitHandler);
// attempt to initialise monitor class
if (!cfg.getValueBool("download_only")) {
try {
m.init(cfg, cfg.getValueLong("verbose") > 0, cfg.getValueBool("skip_symlinks"), cfg.getValueBool("check_nosync"));
} catch (MonitorException e) {
@ -679,8 +680,8 @@ int main(string[] args)
log.error("ERROR: ", e.msg);
exit(-1);
}
}
if (!cfg.getValueBool("download_only")) {
// monitor loop
immutable auto checkInterval = dur!"seconds"(cfg.getValueLong("monitor_interval"));
immutable auto logInterval = cfg.getValueLong("monitor_log_frequency");
@ -748,7 +749,6 @@ int main(string[] args)
}
}
}
}
// Workaround for segfault in std.net.curl.Curl.shutdown() on exit
oneDrive.http.shutdown();