Fix for #4136 connection to linux refused by using wrong Xauthority file.

This PR handles comments of review for PR #4165.
This commit is contained in:
Awalon
2023-04-23 23:58:04 +02:00
parent 028767da8b
commit dcc9337f86
2 changed files with 29 additions and 40 deletions

View File

@@ -328,13 +328,12 @@ fn patch(path: PathBuf) -> PathBuf {
.to_string()
.trim()
.to_owned();
if home_dir.is_empty() {
return format!("/home/{user}").into();
} else {
if !home_dir.is_empty() {
log::info!("config::patch: got home dir from: {}", home_dir);
return home_dir.into();
}
}
return format!("/home/{user}").into();
}
}
}