From 50dd9b1a95bbc700918269102d358a4097f3f6a1 Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Mon, 6 Jun 2011 20:58:12 +0100 Subject: [PATCH] config: never let username be empty --- SparkleLib/SparkleConfig.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SparkleLib/SparkleConfig.cs b/SparkleLib/SparkleConfig.cs index 105b14b2..614d1fb9 100644 --- a/SparkleLib/SparkleConfig.cs +++ b/SparkleLib/SparkleConfig.cs @@ -44,7 +44,7 @@ namespace SparkleLib { string icons_path = System.IO.Path.Combine (config_path, "icons"); if (!Directory.Exists (icons_path)) { Directory.CreateDirectory (icons_path); - SparkleHelpers.DebugInfo ("Config", "Created '" + icons_path + "'"); + SparkleHelpers.DebugInfo ("Config", "Created \"" + icons_path + "\""); } if (!File.Exists (Path)) @@ -68,6 +68,9 @@ namespace SparkleLib { user_name = Environment.UserName; } + if (string.IsNullOrEmpty (user_name)) + user_name = "Unknown"; + TextWriter writer = new StreamWriter (Path); string n = Environment.NewLine;