From 07d5df05f18b804992d2928e7722da0c3fa88790 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E9=9B=85=20=C2=B7=20Misaki=20Masa?= Date: Sun, 17 Sep 2023 15:23:01 +0800 Subject: [PATCH] fix: leave upwards only if an IO error occurs in `current` (#172) --- 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 {