Load NLog.config when not in AppContext.BaseDirectory instead

This is needed as custom NLog.config no longer gets loaded in single-file scenario, where NLog probes the directory of the unpacked files instead.

For non-single-publishes this doesn't change anything, as home directory is equal to base directory if not using custom path.
This commit is contained in:
JustArchi
2020-05-16 00:54:28 +02:00
parent 2d5b736e74
commit 9259043e6d
2 changed files with 5 additions and 3 deletions

View File

@@ -753,8 +753,8 @@ namespace ArchiSteamFarm {
case "":
// No directory, root folder
switch (fileName) {
case Logging.NLogConfigurationFile:
case SharedInfo.LogFile:
case "NLog.config":
// Files with those names in root directory we want to keep
continue;
}