This commit is contained in:
Firstyear 2021-03-25 10:34:50 +10:00 committed by GitHub
parent 060c7b22c0
commit 254a5e060c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -125,7 +125,11 @@ fn create_home_directory(info: &HomeDirectoryInfo, home_prefix: &str) -> Result<
// Does the aliases exist // Does the aliases exist
for alias in info.aliases.iter() { for alias in info.aliases.iter() {
// Sanity check the alias. // Sanity check the alias.
let alias = alias.replace(".", "").replace("/", "").replace("\\", ""); // let alias = alias.replace(".", "").replace("/", "").replace("\\", "");
let alias = alias
.trim_start_matches('.')
.replace("/", "")
.replace("\\", "");
let alias_path_raw = format!("{}{}", home_prefix, alias); let alias_path_raw = format!("{}{}", home_prefix, alias);
let alias_path = Path::new(&alias_path_raw); let alias_path = Path::new(&alias_path_raw);