From c9fc396f9c76a584481b6e3a223c529b07902700 Mon Sep 17 00:00:00 2001 From: David Khristepher Santos Date: Tue, 15 Dec 2020 00:23:15 +0800 Subject: [PATCH] Proper fix for AppPath --- PSXPackager/ApplicationInfo.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/PSXPackager/ApplicationInfo.cs b/PSXPackager/ApplicationInfo.cs index eb3c7dc..5585c47 100644 --- a/PSXPackager/ApplicationInfo.cs +++ b/PSXPackager/ApplicationInfo.cs @@ -1,15 +1,15 @@ -namespace PSXPackager +using System; +using System.IO; + +namespace PSXPackager { public static class ApplicationInfo { public static string AppPath { get; private set; } + static ApplicationInfo() { - // Not working in WSL/Mono - //string path = System.Reflection.Assembly.GetExecutingAssembly().CodeBase.Replace("file:\\\\\\", "").Replace("file:///", ""); - //AppPath = System.IO.Path.GetDirectoryName(path); - AppPath = "."; + AppPath = Path.GetDirectoryName(AppDomain.CurrentDomain.BaseDirectory); } - } }