fix: unitless sync_frequence = 0 not parsed by humantime (#2154)

Resolve #2147
This commit is contained in:
Ellie Huxtable 2024-06-17 08:44:25 +01:00 committed by GitHub
parent 55840bddf5
commit 0a6bfbba3e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -553,6 +553,10 @@ impl Settings {
return Ok(false); return Ok(false);
} }
if self.sync_frequency == "0" {
return Ok(true);
}
match parse_duration(self.sync_frequency.as_str()) { match parse_duration(self.sync_frequency.as_str()) {
Ok(d) => { Ok(d) => {
let d = time::Duration::try_from(d).unwrap(); let d = time::Duration::try_from(d).unwrap();