From e394efdd854f53afe5405cf285a75080942cf5cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Tue, 30 Sep 2025 13:19:58 +0800 Subject: [PATCH] OS (macOS): trims whitespace from full user name --- src/util/platform/FFPlatform_unix.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/util/platform/FFPlatform_unix.c b/src/util/platform/FFPlatform_unix.c index 08379de98..85e624a0d 100644 --- a/src/util/platform/FFPlatform_unix.c +++ b/src/util/platform/FFPlatform_unix.c @@ -1,4 +1,5 @@ #include "FFPlatform_private.h" +#include "util/FFstrbuf.h" #include "util/stringUtils.h" #include "fastfetch_config.h" #include "common/io/io.h" @@ -182,7 +183,11 @@ static void getUserName(FFPlatform* platform, const struct passwd* pwd) ffStrbufAppendS(&platform->userName, user); - if (pwd) ffStrbufAppendS(&platform->fullUserName, pwd->pw_gecos); + if (pwd) + { + ffStrbufAppendS(&platform->fullUserName, pwd->pw_gecos); + ffStrbufTrimSpace(&platform->fullUserName); + } } static void getHostName(FFPlatform* platform, const struct utsname* uts)