Don't break on just ~

main
Ashelyn Dawn 3 years ago
parent 689661f664
commit c1dec7f20a

@ -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("/") {

Loading…
Cancel
Save