Silently fail to 'enter' regular files

pull/654/head
Dugan Chen 11 months ago
parent 2f78691333
commit 5626422ba4

@ -1035,10 +1035,14 @@ impl App {
fn enter(self) -> Result<Self> { fn enter(self) -> Result<Self> {
if let Some(path) = self.focused_node().map(|n| n.absolute_path.clone()) { if let Some(path) = self.focused_node().map(|n| n.absolute_path.clone()) {
if PathBuf::from(&path).absolutize()?.to_path_buf().is_dir() {
self.change_directory(&path, true) self.change_directory(&path, true)
} else { } else {
Ok(self) Ok(self)
} }
} else {
Ok(self)
}
} }
fn back(self) -> Result<Self> { fn back(self) -> Result<Self> {

Loading…
Cancel
Save