config: never let username be empty
This commit is contained in:
parent
38b6283e15
commit
27b651696b
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue