diff --git a/src/path.rs b/src/path.rs index a5e7a96..4e8a9b2 100644 --- a/src/path.rs +++ b/src/path.rs @@ -3,8 +3,8 @@ use std::str::FromStr; pub fn join(root : &str, path : &str) -> String { let mut path = String::from_str(path).unwrap(); - if path.starts_with("~/") { - path = path.replace("~/", "/home/ashe/"); + if path.starts_with("~/") || path.as_str() == "~" { + path = path.replace("~", "/home/ashe"); } if path.starts_with("/") {