Fix known folders for use in the server

This commit is contained in:
Timothy Baldridge 2022-06-10 05:36:45 -06:00
parent 2d8670cf98
commit bf970dc4a1

View File

@ -11,9 +11,13 @@ public static class KnownFolders
{
get
{
//var v = Process.GetCurrentProcess().ProcessName;
//return Assembly.GetExecutingAssembly().Location.ToAbsolutePath().Parent;
return Process.GetCurrentProcess().MainModule!.FileName!.ToAbsolutePath().Parent;
var result = Process.GetCurrentProcess().MainModule!.FileName!.ToAbsolutePath().Parent;
if (result.FileName == "dotnet".ToRelativePath())
{
return Assembly.GetExecutingAssembly().Location.ToAbsolutePath().Parent;
}
return result;
}
}