mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 04:34:59 +00: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);
|
builder.Append(ex.StackTrace);
|
||||||
|
|
||||||
var time = DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss");
|
var time = DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss");
|
||||||
var file = Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName);
|
var file = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),
|
||||||
file = Path.Combine(file, $"crash_{time}.log");
|
"SourceGit",
|
||||||
|
$"crash_{time}.log");
|
||||||
File.WriteAllText(file, builder.ToString());
|
File.WriteAllText(file, builder.ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue