From bc70d9e9dea31b49bde8d2570e81ba017c468483 Mon Sep 17 00:00:00 2001 From: cuqmbr Date: Mon, 22 Aug 2022 15:15:40 +0300 Subject: [PATCH] fix: fix incorrect path to database file --- netxml2kml/Data/DatabaseContext.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/netxml2kml/Data/DatabaseContext.cs b/netxml2kml/Data/DatabaseContext.cs index b046d5f..bc05163 100644 --- a/netxml2kml/Data/DatabaseContext.cs +++ b/netxml2kml/Data/DatabaseContext.cs @@ -14,14 +14,12 @@ public sealed class DatabaseContext : DbContext public DatabaseContext(string dbName = "netxml2kml.sqlite3.db") { - var path = Path.Join(RuntimeStorage.AppFolder, "netxml2kml"); - - if (!Directory.Exists(path)) + if (!Directory.Exists(RuntimeStorage.AppFolder)) { - Directory.CreateDirectory(path); + Directory.CreateDirectory(RuntimeStorage.AppFolder); } - DbPath = Path.Join(path, dbName); + DbPath = Path.Join(RuntimeStorage.AppFolder, dbName); Database.EnsureCreated(); }