Don't break on ~ashe

main
Ashelyn Dawn 2 years ago
parent 3c06415a17
commit d0efe38081

@ -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 = path.replace("~/", "/home/ashe/");
}
if path.starts_with("/") {

Loading…
Cancel
Save