diff --git a/PasteEx/Program.cs b/PasteEx/Program.cs index 87fff20..dd8b227 100644 --- a/PasteEx/Program.cs +++ b/PasteEx/Program.cs @@ -52,6 +52,7 @@ static void Main(string[] args) command = command.Substring(0, command.Length - 1); } + Client.Start(); Application.Run(new FormMain(command)); } else diff --git a/PasteEx/Util/Logger.cs b/PasteEx/Util/Logger.cs index 4575532..5d9ba33 100644 --- a/PasteEx/Util/Logger.cs +++ b/PasteEx/Util/Logger.cs @@ -10,10 +10,15 @@ namespace PasteEx.Util /// public static class Logger { - private static string path = Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "PasteEx", "PasteEx.log"); - static Logger() { + string folder = Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "PasteEx"); + if (!Directory.Exists(folder)) + { + Directory.CreateDirectory(folder); + } + + string path = Path.Combine(folder, "PasteEx.log"); Trace.Listeners.Add(new TextWriterTraceListener(path)); Trace.AutoFlush = true; }