@ -1,4 +1,4 @@
ashe@tilde.club's password:
Welcome to AsheOS 21.12.1 LTS (HRT/Estrix 6.25.21-wasm)
* Technical: https://tempest.dev
@ -1,8 +1,14 @@
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("/") {
return String::from_str(path).unwrap()
return path
let mut result_segments : Vec<&str> = root.split("/").filter(|s| !s.is_empty()).collect();