mirror of
https://github.com/gentoo-mirror/guru.git
synced 2025-04-20 00:08:58 -04:00
29 lines
1.2 KiB
Diff
29 lines
1.2 KiB
Diff
diff --git a/86BoxManager.Core/Registry/Configs.cs b/86BoxManager.Core/Registry/Configs.cs
|
|
index c61e99a..be25067 100644
|
|
--- a/86BoxManager.Core/Registry/Configs.cs
|
|
+++ b/86BoxManager.Core/Registry/Configs.cs
|
|
@@ -1,3 +1,4 @@
|
|
+using System;
|
|
using System.IO;
|
|
using System.Text;
|
|
using Newtonsoft.Json;
|
|
@@ -18,11 +19,13 @@ static Configs()
|
|
{
|
|
Formatting = Formatting.Indented
|
|
};
|
|
- var ass = typeof(Configs).Assembly;
|
|
- var loc = IOPath.GetFullPath(ass.Location);
|
|
- var dir = IOPath.GetDirectoryName(loc) ?? string.Empty;
|
|
- BoxConfigName = IOPath.Combine(dir, "86Box.json");
|
|
- VmxConfigName = IOPath.Combine(dir, "86BoxVMs.json");
|
|
+
|
|
+ var userConfigDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData, Environment.SpecialFolderOption.Create);
|
|
+ var appConfigDir = IOPath.Combine(userConfigDir, "86BoxManager");
|
|
+ if (!Directory.Exists(appConfigDir)) Directory.CreateDirectory(appConfigDir);
|
|
+
|
|
+ BoxConfigName = IOPath.Combine(appConfigDir, "86Box.json");
|
|
+ VmxConfigName = IOPath.Combine(appConfigDir, "86BoxVMs.json");
|
|
}
|
|
|
|
private static void WriteJson(string fileName, object obj)
|