Force update if tasks_changed_since fails (fixes hopefully for good)
@@ -1000,7 +1000,7 @@ impl TaskwarriorTuiApp {
}
pub fn update(&mut self, force: bool) -> Result<()> {
- if force || self.dirty || self.tasks_changed_since(self.last_export)? {
+ if force || self.dirty || self.tasks_changed_since(self.last_export).unwrap_or(true) {
self.last_export = Some(std::time::SystemTime::now());
self.task_report_table.export_headers(None, &self.report)?;
let _ = self.export_tasks();
@@ -1339,8 +1339,7 @@ impl TaskwarriorTuiApp {
pub fn tasks_changed_since(&mut self, prev: Option<SystemTime>) -> Result<bool> {
if let Some(prev) = prev {
- match self.get_task_files_max_mtime() {
- Ok(mtime) => {
+ let mtime = self.get_task_files_max_mtime()?;
if mtime > prev {
Ok(true)
} else {
@@ -1351,9 +1350,6 @@ impl TaskwarriorTuiApp {
let max_delta = Duration::from_secs(60);
Ok(now.duration_since(prev)? > max_delta)
}
- }
- Err(_) => Ok(true),
- }
} else {
Ok(true)
}
