From 9dd843ea692d5ce60eca43686f4206e490345008 Mon Sep 17 00:00:00 2001 From: Michael Babienco Date: Tue, 3 Mar 2026 11:41:44 +0900 Subject: [PATCH] Use process dir to find license file --- src/Views/AboutView.axaml.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Views/AboutView.axaml.cs b/src/Views/AboutView.axaml.cs index 83dc1ec..eab6a53 100644 --- a/src/Views/AboutView.axaml.cs +++ b/src/Views/AboutView.axaml.cs @@ -1,4 +1,5 @@ using System; +using System.Diagnostics; using System.IO; using Avalonia; using Avalonia.Controls; @@ -13,7 +14,8 @@ namespace MayShow.Views this.InitializeComponent(); // set license text - var licenseFileName = "Assets/LICENSES.txt"; + var processDir = Path.GetDirectoryName(Environment.ProcessPath) ?? ""; + var licenseFileName = Path.Combine(processDir, "Assets", "LICENSES.txt"); var licenseText = ""; if (File.Exists(licenseFileName)) { @@ -21,7 +23,7 @@ namespace MayShow.Views } else { - licenseFileName = "../Resources/Assets/LICENSES.txt"; + licenseFileName = Path.Combine(processDir, "../Resources/Assets/LICENSES.txt"); if (File.Exists(licenseFileName)) { licenseText = File.ReadAllText(licenseFileName);