config: never let username be empty

This commit is contained in:
Hylke Bons 2011-06-06 20:58:12 +01:00
parent 0a76b3225c
commit 50dd9b1a95

View file

@ -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;