mirror of
https://github.com/sayanarijit/xplr.git
synced 2024-10-26 10:56:25 +03:00
Silently fail to 'enter' regular files
This commit is contained in:
parent
2f78691333
commit
5626422ba4
@ -1035,7 +1035,11 @@ impl App {
|
||||
|
||||
fn enter(self) -> Result<Self> {
|
||||
if let Some(path) = self.focused_node().map(|n| n.absolute_path.clone()) {
|
||||
self.change_directory(&path, true)
|
||||
if PathBuf::from(&path).absolutize()?.to_path_buf().is_dir() {
|
||||
self.change_directory(&path, true)
|
||||
} else {
|
||||
Ok(self)
|
||||
}
|
||||
} else {
|
||||
Ok(self)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user