diff options
author | Alexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com> | 2022-12-14 00:21:57 +0300 |
---|---|---|
committer | Alexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com> | 2022-12-14 00:21:57 +0300 |
commit | efc9b488c92f07607903e8d740ee79b7eadc9b7b (patch) | |
tree | 95eb466516e59aeafb3013821aa9c3357e8c79bd | |
parent | 98b3ab67db17aa64c5732f62ea5203b8d9b06d23 (diff) |
Using AppContext.BaseDirectory to search for nestiler-colors.json
-rw-r--r-- | NesTiler/Config.cs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/NesTiler/Config.cs b/NesTiler/Config.cs index ded6c78..2f4a327 100644 --- a/NesTiler/Config.cs +++ b/NesTiler/Config.cs @@ -51,6 +51,8 @@ namespace com.clusterrr.Famicom.NesTiler private Config()
{
ColorsFile = Path.Combine(Path.GetDirectoryName(Process.GetCurrentProcess().MainModule!.FileName)!, DEFAULT_COLORS_FILE);
+ if (!File.Exists(ColorsFile))
+ Path.Combine(AppContext.BaseDirectory, DEFAULT_COLORS_FILE);
if (!File.Exists(ColorsFile) && !OperatingSystem.IsWindows())
ColorsFile = Path.Combine("/etc", DEFAULT_COLORS_FILE);
}
|