Merge pull request #1827 from hbons/fix/logs-sharing-violation
Fix/logs sharing violation
This commit is contained in:
commit
036e5369f3
|
@ -50,8 +50,8 @@ namespace SparkleShare {
|
|||
var gvfs_set_attribute = new Command ("gvfs-set-attribute", "\"" + Configuration.DefaultConfiguration.FoldersPath + "\" " +
|
||||
"metadata::custom-icon-name org.sparkleshare.SparkleShare");
|
||||
|
||||
gvfs_set_attribute.StartInfo.EnvironmentVariables ["XDG_DATA_HOME"] =
|
||||
Path.Combine (Config.HomePath, ".local", "share");
|
||||
string XDG_DATA_HOME = Path.Combine (Config.HomePath, ".local", "share");
|
||||
gvfs_set_attribute.StartInfo.EnvironmentVariables ["XDG_DATA_HOME"] = XDG_DATA_HOME;
|
||||
|
||||
gvfs_set_attribute.StartAndWaitForExit ();
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -52,7 +52,7 @@ namespace Sparkles {
|
|||
{
|
||||
string folder = "";
|
||||
|
||||
if (!string.IsNullOrEmpty (StartInfo.WorkingDirectory))
|
||||
if (StartInfo.WorkingDirectory != Path.GetTempPath ())
|
||||
folder = Path.GetFileName (StartInfo.WorkingDirectory) + " | ";
|
||||
|
||||
if (write_output)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue