From d0efe380811075f56d5680b1e52209c1f040f087 Mon Sep 17 00:00:00 2001 From: Ashelyn Dawn Date: Sun, 1 May 2022 21:37:31 -0600 Subject: [PATCH] Don't break on ~ashe --- src/path.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/path.rs b/src/path.rs index 54c2436..a5e7a96 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 = path.replace("~/", "/home/ashe/"); } if path.starts_with("/") {