diff --git a/SparkleShare/Linux/UserInterface.cs b/SparkleShare/Linux/UserInterface.cs index 38ef4072..95c508af 100644 --- a/SparkleShare/Linux/UserInterface.cs +++ b/SparkleShare/Linux/UserInterface.cs @@ -24,10 +24,8 @@ using Sparkles; namespace SparkleShare { - public class UserInterface { - public static string AssetsPath = InstallationInfo.Directory; public StatusIcon StatusIcon; @@ -53,7 +51,8 @@ namespace SparkleShare application.Register (null); application.Activated += ApplicationActivatedDelegate; - IconTheme.Default.AppendSearchPath (Path.Combine (UserInterface.AssetsPath, "icons")); + if (IconTheme.Default != null) + IconTheme.Default.AppendSearchPath (Path.Combine (UserInterface.AssetsPath, "icons")); var label = new Label (); Gdk.Color color = UserInterfaceHelpers.RGBAToColor (label.StyleContext.GetColor (StateFlags.Insensitive)); diff --git a/Sparkles/Logger.cs b/Sparkles/Logger.cs index 80c70779..be1a6245 100644 --- a/Sparkles/Logger.cs +++ b/Sparkles/Logger.cs @@ -22,7 +22,7 @@ namespace Sparkles { public static class Logger { - static StreamWriter log_writer = File.AppendText (Configuration.DefaultConfiguration.LogFilePath); + static StreamWriter log_writer = File.CreateText (Configuration.DefaultConfiguration.LogFilePath); static object log_writer_lock = new object (); @@ -63,6 +63,9 @@ namespace Sparkles { public static void WriteCrashReport (Exception e) { + if (log_writer != null) + log_writer.Close (); + string home_path = Environment.GetFolderPath (Environment.SpecialFolder.Personal); if (InstallationInfo.OperatingSystem == OS.Windows)