Log zEdit merge errors

This commit is contained in:
Halgari 2022-10-17 21:41:28 -06:00
parent 3f7ab92090
commit 320df0d96d
2 changed files with 17 additions and 1 deletions

View File

@ -5,6 +5,7 @@
* Basic support for commandline options in the WPF app * Basic support for commandline options in the WPF app
* Re-add support for file associations of Wabbajack and .wabbajack files (thanks erri!) * Re-add support for file associations of Wabbajack and .wabbajack files (thanks erri!)
* Update to the latest game finder libraries * Update to the latest game finder libraries
* Add some debugging messages for when zEdit merge fails
#### Version - 3.0.1.9 - 10/4/2022 #### Version - 3.0.1.9 - 10/4/2022
* Lots of compiler improvements for faster compilation * Lots of compiler improvements for faster compilation

View File

@ -479,7 +479,22 @@ public class StandardInstaller : AInstaller<StandardInstaller>
await using var fs = _configuration.Install.Combine(m.To) await using var fs = _configuration.Install.Combine(m.To)
.Open(FileMode.Create, FileAccess.ReadWrite, FileShare.None); .Open(FileMode.Create, FileAccess.ReadWrite, FileShare.None);
await BinaryPatching.ApplyPatch(new MemoryStream(srcData), new MemoryStream(patchData), fs); try
{
await BinaryPatching.ApplyPatch(new MemoryStream(srcData), new MemoryStream(patchData), fs);
}
catch (Exception ex)
{
_logger.LogError(ex, "While creating zEdit merge, entering debugging mode");
foreach (var source in m.Sources)
{
var hash = await _configuration.Install.Combine(source.RelativePath).Hash();
_logger.LogInformation("For {Source} expected hash {Expected} got {Got}", source.RelativePath, source.Hash, hash);
}
throw;
}
return m; return m;
}).ToList(); }).ToList();
} }