diff --git a/src/App.axaml.cs b/src/App.axaml.cs index 924d79b5..f11f9eaf 100644 --- a/src/App.axaml.cs +++ b/src/App.axaml.cs @@ -32,8 +32,9 @@ namespace SourceGit { builder.Append(ex.StackTrace); var time = DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss"); - var file = Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName); - file = Path.Combine(file, $"crash_{time}.log"); + var file = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), + "SourceGit", + $"crash_{time}.log"); File.WriteAllText(file, builder.ToString()); } }