Merge pull request #963 from wabbajack-tools/fix-missing-game-folder-files

More diagnostic information on archives that fail to resolve
This commit is contained in:
Timothy Baldridge 2020-07-16 05:27:45 -07:00 committed by GitHub
commit 8999179920
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 7 deletions

View File

@ -376,7 +376,7 @@ namespace Wabbajack.Lib
Utils.Log(
$"Removing {remove.Count} archives from the compilation state, this is probably not an issue but reference this if you have compilation failures");
remove.Do(r => Utils.Log($"Resolution failed for: {r.File.FullPath}"));
remove.Do(r => Utils.Log($"Resolution failed for: ({r.File.Size} {r.File.Hash}) {r.File.FullPath}"));
IndexedArchives.RemoveAll(a => remove.Contains(a));
}
@ -601,10 +601,6 @@ namespace Wabbajack.Lib
new IncludePatches(this),
new IncludeDummyESPs(this),
// If we have no match at this point for a game folder file, skip them, we can't do anything about them
new IgnoreGameFiles(this),
// There are some types of files that will error the compilation, because they're created on-the-fly via tools
// so if we don't have a match by this point, just drop them.
new IgnoreEndsWith(this, ".ini"),

View File

@ -538,8 +538,28 @@ namespace Wabbajack.Test
Assert.False(utils.InstallFolder.Combine(Consts.GameFolderFilesDir).IsDirectory);
}
[Fact]
public async Task MissingGameFolderFilesBreakInstallation()
{
var profile = utils.AddProfile();
var mod = await utils.AddMod();
var testPex = await utils.AddModFile(mod, @"Data\scripts\test.pex", 10);
await utils.Configure();
utils.MO2Folder.Combine(Consts.GameFolderFilesDir).CreateDirectory();
await utils.MO2Folder.Combine(Consts.GameFolderFilesDir).Combine("dx4242.dll")
.WriteAllBytesAsync(utils.RandomData());
await utils.AddManualDownload(
new Dictionary<string, byte[]> {{"/baz/biz.pex", await testPex.ReadAllBytesAsync()}});
await Assert.ThrowsAsync<TrueException>(async () => await CompileAndInstall(profile));
}
/// <summary>
/// Issue #861 : https://github.com/wabbajack-tools/wabbajack/issues/861
/// </summary>