From adb3354615243d75715f41441f68de85480f62f1 Mon Sep 17 00:00:00 2001 From: Timothy Baldridge Date: Tue, 21 Apr 2020 16:58:42 -0600 Subject: [PATCH] Rel path conversion name issues in IncludePathces --- Wabbajack.Lib/CompilationSteps/IncludePatches.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Wabbajack.Lib/CompilationSteps/IncludePatches.cs b/Wabbajack.Lib/CompilationSteps/IncludePatches.cs index 65cb6b40..b36152d7 100644 --- a/Wabbajack.Lib/CompilationSteps/IncludePatches.cs +++ b/Wabbajack.Lib/CompilationSteps/IncludePatches.cs @@ -52,15 +52,16 @@ namespace Wabbajack.Lib.CompilationSteps } } - var installationFile = (RelativePath)modIni?.General?.installationFile; + var installationFile = (string?)modIni?.General?.installationFile; VirtualFile? found = null; // Find based on exact file name + ext - if (choices != null) + if (choices != null && installationFile != null) { + var relName = (RelativePath)Path.GetFileName(installationFile); found = choices.FirstOrDefault( - f => f.FilesInFullPath.First().Name.FileName == installationFile); + f => f.FilesInFullPath.First().Name.FileName == relName); } // Find based on file name only (not ext) @@ -72,10 +73,11 @@ namespace Wabbajack.Lib.CompilationSteps } // Find based on matchAll= in [General] in meta.ini - var matchAllName = (RelativePath?)modIni?.General?.matchAll; + var matchAllName = (string?)modIni?.General?.matchAll; if (matchAllName != null) { - if (_indexedByName.TryGetValue(matchAllName.Value, out var arch)) + var relName = (RelativePath)Path.GetFileName(matchAllName); + if (_indexedByName.TryGetValue(relName, out var arch)) { // Just match some file in the archive based on the smallest delta difference found = arch.ThisAndAllChildren