From bf970dc4a19ffea532cb0e11b819c9b6f4456241 Mon Sep 17 00:00:00 2001 From: Timothy Baldridge Date: Fri, 10 Jun 2022 05:36:45 -0600 Subject: [PATCH] Fix known folders for use in the server --- Wabbajack.Paths.IO/KnownFolders.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Wabbajack.Paths.IO/KnownFolders.cs b/Wabbajack.Paths.IO/KnownFolders.cs index cf761741..e1ea4cfe 100644 --- a/Wabbajack.Paths.IO/KnownFolders.cs +++ b/Wabbajack.Paths.IO/KnownFolders.cs @@ -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; } }