diff --git a/Wabbajack.Compiler/CompilationSteps/IncludePatches.cs b/Wabbajack.Compiler/CompilationSteps/IncludePatches.cs index 0bd50cb4..6a10d288 100644 --- a/Wabbajack.Compiler/CompilationSteps/IncludePatches.cs +++ b/Wabbajack.Compiler/CompilationSteps/IncludePatches.cs @@ -63,7 +63,9 @@ public class IncludePatches : ACompilationStep else if (_bsa != null) { var bsaPath = _bsa.FullPath.Base; - ((MO2Compiler) _compiler).ModInis.TryGetValue(ModForFile(bsaPath), out modIni); + var modPath = ModForFile(bsaPath); + if (modPath != default) + ((MO2Compiler) _compiler).ModInis.TryGetValue(modPath, out modIni); } } @@ -148,6 +150,8 @@ public class IncludePatches : ACompilationStep private AbsolutePath ModForFile(AbsolutePath file) { + if (!file.InFolder(((MO2Compiler) _compiler).MO2ModsFolder)) + return default; return file.RelativeTo(((MO2Compiler) _compiler).MO2ModsFolder).TopParent .RelativeTo(((MO2Compiler) _compiler).MO2ModsFolder); } diff --git a/Wabbajack.Services.OSIntegrated/ServiceExtensions.cs b/Wabbajack.Services.OSIntegrated/ServiceExtensions.cs index 1e3be906..b29c6b3a 100644 --- a/Wabbajack.Services.OSIntegrated/ServiceExtensions.cs +++ b/Wabbajack.Services.OSIntegrated/ServiceExtensions.cs @@ -65,7 +65,7 @@ public static class ServiceExtensions : new VFSDiskCache(KnownFolders.WabbajackAppLocal.Combine("GlobalVFSCache3.sqlite")); var cesiCache = new CesiVFSCache(s.GetRequiredService>(), s.GetRequiredService()); - return new FallthroughVFSCache(new IVfsCache[] {diskCache, cesiCache}); + return new FallthroughVFSCache(new IVfsCache[] {diskCache}); }); service.AddSingleton(s => options.UseLocalCache