From 1319a566f9b18ee604d91ca7e6f29ebf5bbcdd77 Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Wed, 8 Jun 2011 21:39:39 +0100 Subject: [PATCH] config: Only trim user name if it isn't null --- SparkleLib/SparkleConfig.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SparkleLib/SparkleConfig.cs b/SparkleLib/SparkleConfig.cs index e9603269..9995316c 100644 --- a/SparkleLib/SparkleConfig.cs +++ b/SparkleLib/SparkleConfig.cs @@ -62,12 +62,12 @@ namespace SparkleLib { SparkleBackend.Platform == PlatformID.MacOSX) { user_name = new UnixUserInfo (UnixEnvironment.UserName).RealName; - user_name = user_name.TrimEnd (",".ToCharArray()); - } if (string.IsNullOrEmpty (user_name)) user_name = Environment.UserName; + else + user_name = user_name.TrimEnd (",".ToCharArray()); TextWriter writer = new StreamWriter (Path); string n = Environment.NewLine;