|
|
@ -3,8 +3,8 @@ use std::str::FromStr;
|
|
|
|
pub fn join(root : &str, path : &str) -> String {
|
|
|
|
pub fn join(root : &str, path : &str) -> String {
|
|
|
|
let mut path = String::from_str(path).unwrap();
|
|
|
|
let mut path = String::from_str(path).unwrap();
|
|
|
|
|
|
|
|
|
|
|
|
if path.starts_with("~/") {
|
|
|
|
if path.starts_with("~/") || path.as_str() == "~" {
|
|
|
|
path = path.replace("~/", "/home/ashe/");
|
|
|
|
path = path.replace("~", "/home/ashe");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if path.starts_with("/") {
|
|
|
|
if path.starts_with("/") {
|
|
|
|