From 021e8d2ad978eb197b2a92f83047db5d3140675f Mon Sep 17 00:00:00 2001 From: JustArchi Date: Sat, 5 Aug 2017 15:13:06 +0200 Subject: [PATCH] Don't move NLog.config during update, #586 --- ArchiSteamFarm/ASF.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ArchiSteamFarm/ASF.cs b/ArchiSteamFarm/ASF.cs index b66326c62..987f1481f 100644 --- a/ArchiSteamFarm/ASF.cs +++ b/ArchiSteamFarm/ASF.cs @@ -482,7 +482,14 @@ namespace ArchiSteamFarm { // Move top-level runtime in-use files to other directory // We must do it in order to not crash at later stage - all libraries/executables must keep original names foreach (string file in Directory.EnumerateFiles(targetDirectory)) { - string target = Path.Combine(backupDirectory, Path.GetFileName(file)); + string fileName = Path.GetFileName(file); + switch (fileName) { + // Files that we want to keep in original directory + case "NLog.config": + continue; + } + + string target = Path.Combine(backupDirectory, fileName); File.Move(file, target); }