mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-23 20:47:25 -08:00
update<crash>: store crash log in $APPDATA
This commit is contained in:
parent
01af736d50
commit
da3a50e20c
1 changed files with 3 additions and 2 deletions
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue