Set full_name_opt to None when GECOS data is empty

This commit is contained in:
Lily Foster 2024-09-27 10:52:27 -04:00
parent 4ddb320dae
commit 37a96b4b30
No known key found for this signature in database
GPG key ID: 49340081E484C893
3 changed files with 4 additions and 2 deletions

View file

@ -105,6 +105,7 @@ fn user_data_fallback() -> Vec<UserData> {
name: user.name,
full_name_opt: user
.gecos
.filter(|s| !s.is_empty())
.map(|gecos| gecos.split(',').next().unwrap_or_default().to_string()),
icon_opt,
theme_opt: None,