From cb7112a012fd6be42c2a925b7af49e6225711a9c Mon Sep 17 00:00:00 2001 From: sxyazi Date: Sun, 17 Sep 2023 08:05:47 +0800 Subject: [PATCH] fix: leave upwards only if an IO error occurs in `current` --- core/src/manager/manager.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/core/src/manager/manager.rs b/core/src/manager/manager.rs index f83e4807..e8e8f881 100644 --- a/core/src/manager/manager.rs +++ b/core/src/manager/manager.rs @@ -362,14 +362,13 @@ impl Manager { if url == self.cwd() { self.current_mut().update(op); + self.active_mut().leave(); + true } else if matches!(self.parent(), Some(p) if &p.cwd == url) { - self.active_mut().parent.as_mut().unwrap().update(op); + self.active_mut().parent.as_mut().unwrap().update(op) } else { - return false; + false } - - self.active_mut().leave(); - true } pub fn update_mimetype(&mut self, mut mimes: BTreeMap, tasks: &Tasks) -> bool {