Unzip resources in reverse order and overwrite

This commit is contained in:
Jarrod Doyle 2025-01-15 21:24:19 +00:00
parent 6b96f33132
commit 785442e60e
Signed by: Jayrude
GPG Key ID: 38B57B16E7C0ADF7
1 changed files with 3 additions and 2 deletions

View File

@ -189,11 +189,12 @@ public class ResourcePathManager
// Do the extraction bro // Do the extraction bro
// The path order is a priority order, so we don't want to overwrite any files when extracting // The path order is a priority order, so we don't want to overwrite any files when extracting
// TODO: Check if there's any problems caused by case sensitivity // TODO: Check if there's any problems caused by case sensitivity
foreach (var zipPath in zipPaths) for (var i = 0; i < zipPaths.Count; i++)
{ {
var zipPath = zipPaths[^(i + 1)];
var resType = Path.GetFileNameWithoutExtension(zipPath); var resType = Path.GetFileNameWithoutExtension(zipPath);
var extractPath = Path.Join(_extractionPath, resType); var extractPath = Path.Join(_extractionPath, resType);
ZipFile.OpenRead(zipPath).ExtractToDirectory(extractPath, false); ZipFile.OpenRead(zipPath).ExtractToDirectory(extractPath, true);
} }
if (!FindConfigVar(installCfgLines, "load_path", out var omsPath)) if (!FindConfigVar(installCfgLines, "load_path", out var omsPath))