Simpler Pattern
This commit is contained in:
parent
1eb8a17315
commit
f09b2dd0ab
|
@ -121,7 +121,7 @@ fn expand_tilde_with_another_user_home(path: &Path) -> PathBuf {
|
||||||
return match path.to_str() {
|
return match path.to_str() {
|
||||||
Some(file_path) => {
|
Some(file_path) => {
|
||||||
let mut file = file_path.to_string();
|
let mut file = file_path.to_string();
|
||||||
match file_path.find(|c| c == '/' || c == '\\') {
|
match file_path.find(['/', '\\']) {
|
||||||
None => {
|
None => {
|
||||||
file.remove(0);
|
file.remove(0);
|
||||||
user_home_dir(&file)
|
user_home_dir(&file)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user