Fixes so Septimus compiles

This commit is contained in:
Timothy Baldridge 2022-08-02 14:09:47 -06:00
parent 8472fa8d73
commit 175677a033
2 changed files with 6 additions and 2 deletions

View File

@ -63,7 +63,9 @@ public class IncludePatches : ACompilationStep
else if (_bsa != null) else if (_bsa != null)
{ {
var bsaPath = _bsa.FullPath.Base; 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) private AbsolutePath ModForFile(AbsolutePath file)
{ {
if (!file.InFolder(((MO2Compiler) _compiler).MO2ModsFolder))
return default;
return file.RelativeTo(((MO2Compiler) _compiler).MO2ModsFolder).TopParent return file.RelativeTo(((MO2Compiler) _compiler).MO2ModsFolder).TopParent
.RelativeTo(((MO2Compiler) _compiler).MO2ModsFolder); .RelativeTo(((MO2Compiler) _compiler).MO2ModsFolder);
} }

View File

@ -65,7 +65,7 @@ public static class ServiceExtensions
: new VFSDiskCache(KnownFolders.WabbajackAppLocal.Combine("GlobalVFSCache3.sqlite")); : new VFSDiskCache(KnownFolders.WabbajackAppLocal.Combine("GlobalVFSCache3.sqlite"));
var cesiCache = new CesiVFSCache(s.GetRequiredService<ILogger<CesiVFSCache>>(), var cesiCache = new CesiVFSCache(s.GetRequiredService<ILogger<CesiVFSCache>>(),
s.GetRequiredService<Client>()); s.GetRequiredService<Client>());
return new FallthroughVFSCache(new IVfsCache[] {diskCache, cesiCache}); return new FallthroughVFSCache(new IVfsCache[] {diskCache});
}); });
service.AddSingleton<IBinaryPatchCache>(s => options.UseLocalCache service.AddSingleton<IBinaryPatchCache>(s => options.UseLocalCache