fix: leave upwards only if an IO error occurs in current

This commit is contained in:
sxyazi 2023-09-17 08:05:47 +08:00
parent 09243716a9
commit cb7112a012
No known key found for this signature in database

View file

@ -362,14 +362,13 @@ impl Manager {
if url == self.cwd() { if url == self.cwd() {
self.current_mut().update(op); self.current_mut().update(op);
self.active_mut().leave();
true
} else if matches!(self.parent(), Some(p) if &p.cwd == url) { } 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 { } else {
return false; false
} }
self.active_mut().leave();
true
} }
pub fn update_mimetype(&mut self, mut mimes: BTreeMap<Url, String>, tasks: &Tasks) -> bool { pub fn update_mimetype(&mut self, mut mimes: BTreeMap<Url, String>, tasks: &Tasks) -> bool {