From 3d5a0a04229eb8d7e211aed8d554c9f81fc0c9b0 Mon Sep 17 00:00:00 2001 From: JelleInfinity <60387522+JelleInfinity@users.noreply.github.com> Date: Wed, 21 Dec 2022 23:27:12 +0100 Subject: [PATCH] Don't delete the user's hashes folder on update (#558) --- Updater/Program.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Updater/Program.cs b/Updater/Program.cs index e148d18f..996dd2e8 100644 --- a/Updater/Program.cs +++ b/Updater/Program.cs @@ -90,8 +90,12 @@ namespace Updater string dirName = new DirectoryInfo(dir).Name; - if (Directory.Exists(Path.Combine(folderDir, dirName + @"\"))) + if (!dirName.Equals("Hashes", StringComparison.CurrentCultureIgnoreCase) // Let's keep the users custom hashes in tact + && Directory.Exists(Path.Combine(folderDir, dirName + @"\"))) + { Directory.Delete(Path.Combine(folderDir, dirName + @"\"), true); + } + Directory.Move(dir, Path.Combine(folderDir, dirName + @"\")); } foreach (string file in Directory.GetFiles("master/"))