mirror of
https://github.com/abraunegg/onedrive
synced 2024-06-04 15:02:25 +02:00
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:
parent
df3fba1be0
commit
7ba59e0b1d
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue