Skip to content

Commit

Permalink
Merge pull request #2604 from wabbajack-tools/fo3-bsa-fix
Browse files Browse the repository at this point in the history
Fix FO3 / FNV / Skyrim LE files with special characters in the path corrupting when being packed
  • Loading branch information
tr4wzified authored Aug 11, 2024
2 parents 5cc6d86 + 0ffe0ca commit ec36b8a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
### Changelog

#### Version - 3.7.1.0 - ?
* Fixed file paths with special characters corrupting when packed into BSAs
* This issue only affected Fallout 3, Fallout NV and Skyrim LE
* Added logging to determine which downloaded files cannot be hashed
* This could occur in the downloading phase when installing a modlist when there are broken/corrupted files in the downloads folder

#### Version - 3.7.0.0 - 6/21/2024
* Added Starfield support
* Note: Hashes were added earlier, but the earlier version was not fully compatible due to Wabbajack extracting the BA2 archives incorrectly. This has been fixed.
Expand Down
1 change: 1 addition & 0 deletions Wabbajack.Compression.BSA/BinaryHelperExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ private static Encoding GetEncoding(VersionType version)
return version switch
{
VersionType.TES3 => Encoding.ASCII,
VersionType.FO3 => Encoding.UTF8,
VersionType.SSE => Windows1252,
_ => Encoding.UTF7
};
Expand Down
11 changes: 10 additions & 1 deletion Wabbajack.Installer/StandardInstaller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,16 @@ await _configuration.Downloads.EnumerateFiles()
var metaFile = download.WithExtension(Ext.Meta);
var found = bySize[download.Size()];
var hash = await FileHashCache.FileHashCachedAsync(download, token);
Hash hash = default;
try
{
hash = await FileHashCache.FileHashCachedAsync(download, token);
}
catch(Exception ex)
{
_logger.LogError($"Failed to get hash for file {download}!");
throw;
}
var archive = found.FirstOrDefault(f => f.Hash == hash);
IEnumerable<string> meta;
Expand Down

0 comments on commit ec36b8a

Please sign in to comment.