mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-21 13:03:31 -04:00
app-emulation/86BoxManagerX: fix ebuild
Signed-off-by: Gonçalo Duarte <gonegrier.duarte@gmail.com>
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
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)
|
||||
Reference in New Issue
Block a user