Fix focus on back

pull/649/head
Arijit Basu 10 months ago
parent 313c61db96
commit ad50342260
No known key found for this signature in database
GPG Key ID: 0F8EF5258DC38077

@ -1042,11 +1042,10 @@ impl App {
}
fn back(self) -> Result<Self> {
if let Some(p) = PathBuf::from(self.pwd.clone())
.parent()
.and_then(|p| p.to_str())
{
let pwd = self.pwd.clone();
if let Some(p) = PathBuf::from(&pwd).parent().and_then(|p| p.to_str()) {
self.change_directory(p, true)
.and_then(|a| a.focus_path(&pwd, false))
} else {
Ok(self)
}

Loading…
Cancel
Save