From 1aa391dde9c7b44178d13520688a2e6232e0be2f Mon Sep 17 00:00:00 2001 From: Timothy Baldridge Date: Tue, 23 Feb 2021 17:17:48 -0700 Subject: [PATCH 1/2] Fixes #860 --- Compression.BSA/BA2Reader.cs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Compression.BSA/BA2Reader.cs b/Compression.BSA/BA2Reader.cs index 19b08e3c..749ad639 100644 --- a/Compression.BSA/BA2Reader.cs +++ b/Compression.BSA/BA2Reader.cs @@ -101,13 +101,9 @@ namespace Compression.BSA file.FullPath = Encoding.UTF8.GetString(_rdr.ReadBytes(_rdr.ReadInt16())); } Files = files; - - } - - public async ValueTask DisposeAsync() - { _stream?.Dispose(); - _rdr?.Dispose(); + _rdr.Dispose(); + } public IEnumerable Files { get; private set; } From ff3f34c31dae8157f220761b295754d16306263b Mon Sep 17 00:00:00 2001 From: Timothy Baldridge Date: Tue, 23 Feb 2021 17:26:50 -0700 Subject: [PATCH 2/2] Fixes #1330 --- Wabbajack.Common/Paths.cs | 3 +-- Wabbajack.Test/SanityTests.cs | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/Wabbajack.Common/Paths.cs b/Wabbajack.Common/Paths.cs index dcc9ba05..f657947c 100644 --- a/Wabbajack.Common/Paths.cs +++ b/Wabbajack.Common/Paths.cs @@ -164,8 +164,7 @@ namespace Wabbajack.Common public static bool operator ==(Extension a, Extension b) { - // Super fast comparison because extensions are interned - return ReferenceEquals(a._extension, b._extension); + return string.Equals(a._extension, b._extension, StringComparison.CurrentCultureIgnoreCase); } public static bool operator !=(Extension a, Extension b) diff --git a/Wabbajack.Test/SanityTests.cs b/Wabbajack.Test/SanityTests.cs index 157b2a52..895dc4c0 100644 --- a/Wabbajack.Test/SanityTests.cs +++ b/Wabbajack.Test/SanityTests.cs @@ -42,6 +42,25 @@ namespace Wabbajack.Test await utils.VerifyInstalledFile(mod, @"Data\scripts\test.pex"); } + [Fact] + public async Task TestCacheFileAreIgnored() + { + + var profile = utils.AddProfile(); + var mod = await utils.AddMod(); + var testCache = await utils.AddModFile(mod, @"Data\scripts\test.cache", 10); + var testPex = await utils.AddModFile(mod, @"Data\scripts\test.pex", 10); + + await utils.Configure(); + + await utils.AddManualDownload( + new Dictionary {{"/baz/biz.pex", await testPex.ReadAllBytesAsync()}}); + + await CompileAndInstall(profile); + + await utils.VerifyInstalledFile(mod, @"Data\scripts\test.pex"); + } + [Fact] public async Task ExtraFilesInDownloadFolderDontStopCompilation() {