fix: application data dir may not have been created before crash (#161)

This commit is contained in:
leo 2024-06-03 09:44:12 +08:00
parent f1f54bf6fe
commit 49ce07443e
4 changed files with 8 additions and 12 deletions

View file

@ -25,7 +25,7 @@ namespace SourceGit.Models
static AvatarManager()
{
_storePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "SourceGit", "avatars");
_storePath = Path.Combine(Native.OS.DataDir, "avatars");
if (!Directory.Exists(_storePath))
Directory.CreateDirectory(_storePath);