mirror of
https://github.com/sayanarijit/xplr.git
synced 2024-09-11 11:05:39 +03:00
Use built-in node method
This commit is contained in:
parent
5626422ba4
commit
4aeb3dd7c8
@ -1034,8 +1034,9 @@ impl App {
|
||||
}
|
||||
|
||||
fn enter(self) -> Result<Self> {
|
||||
if let Some(path) = self.focused_node().map(|n| n.absolute_path.clone()) {
|
||||
if PathBuf::from(&path).absolutize()?.to_path_buf().is_dir() {
|
||||
if let Some(node) = self.focused_node() {
|
||||
if node.is_dir {
|
||||
let path = node.absolute_path.clone();
|
||||
self.change_directory(&path, true)
|
||||
} else {
|
||||
Ok(self)
|
||||
|
Loading…
Reference in New Issue
Block a user