1
0
mirror of synced 2024-11-30 18:24:39 +01:00

Don't delete the user's hashes folder on update (#558)

This commit is contained in:
JelleInfinity 2022-12-21 23:27:12 +01:00 committed by GitHub
parent cab002cae1
commit 3d5a0a0422
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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/"))