fixed race condition causing various features to fail

This commit is contained in:
Frank Skare
2019-08-07 13:16:05 +02:00
parent 966f96a02b
commit 1447636eb7
5 changed files with 21 additions and 20 deletions

View File

@@ -15,7 +15,7 @@ namespace mpvnet
public static string[] UrlWhitelist { get; set; } = { "tube", "vimeo", "ard", "zdf" };
public static string RegPath { get; } = @"HKCU\Software\" + Application.ProductName;
public static string ConfPath { get; } = mp.ConfigFolder + "\\mpvnet.conf";
public static string ConfPath { get => mp.ConfigFolder + "mpvnet.conf"; }
public static string DarkMode { get; set; } = "always";
public static string ProcessInstance { get; set; } = "single";
public static string DarkColor { get; set; }
@@ -49,7 +49,7 @@ namespace mpvnet
{
try
{
string filePath = mp.ConfigFolder + "\\mpvnet-debug.log";
string filePath = mp.ConfigFolder + "mpvnet-debug.log";
if (File.Exists(filePath)) File.Delete(filePath);
Trace.Listeners.Add(new TextWriterTraceListener(filePath));
Trace.AutoFlush = true;