Bugfix appdata directory not being created

This commit is contained in:
Alessandro Proto 2023-01-20 09:37:53 +01:00
parent 3e3b1654fc
commit 1eecf58cd0

View file

@ -9,6 +9,10 @@ using IHost host = Host.CreateDefaultBuilder(args)
.ConfigureAppConfiguration((context, c) =>
{
var settingsPath = Path.Combine(Capy64.Capy64.AppDataPath, "settings.json");
if(!Directory.Exists(Capy64.Capy64.AppDataPath))
{
Directory.CreateDirectory(Capy64.Capy64.AppDataPath);
}
if (!File.Exists(settingsPath))
{
File.Copy("Assets/default.json", settingsPath);