This commit is contained in:
Timothy Baldridge 2022-09-19 20:03:54 -06:00
parent f450cdf030
commit a841ed0ce6
4 changed files with 8 additions and 3 deletions

View File

@ -1,5 +1,9 @@
### Changelog ### Changelog
#### Version - 3.0.1.2 - 9/19/2022
* Fix error with FNV BSAs not building properly when files are in the root folder
* Fix for UnknownError in the Launcher (will require the Wabbajack.exe launcher to be re-downloaded)
#### Version - 3.0.1.1 - 9/19/2022 #### Version - 3.0.1.1 - 9/19/2022
* Auto install WebView2 if Windows doesn't already have it installed * Auto install WebView2 if Windows doesn't already have it installed
* Save settings before exiting the app * Save settings before exiting the app

View File

@ -38,7 +38,7 @@ public class Builder : IBuilder
public IEnumerable<RelativePath> FolderNames public IEnumerable<RelativePath> FolderNames
{ {
get { return _files.Select(f => f.Path.Parent).Distinct(); } get { return _files.Select(f => f.Path.Level == 1 ? default : f.Path.Parent).Distinct(); }
} }
public bool HasFolderNames => ArchiveFlags.HasFlag(ArchiveFlags.HasFileNames); public bool HasFolderNames => ArchiveFlags.HasFlag(ArchiveFlags.HasFileNames);
@ -122,7 +122,7 @@ public class Builder : IBuilder
public void RegenFolderRecords() public void RegenFolderRecords()
{ {
_folders = _files.GroupBy(f => f.Path.Parent) _folders = _files.GroupBy(f => f.Path.Level == 1 ? default : f.Path.Parent)
.Select(f => new FolderRecordBuilder(this, f.Key, f.ToList())) .Select(f => new FolderRecordBuilder(this, f.Key, f.ToList()))
.OrderBy(f => f._hash) .OrderBy(f => f._hash)
.ToList(); .ToList();

View File

@ -215,7 +215,7 @@ public class MainWindowViewModel : ViewModelBase
try try
{ {
Status = "Launching..."; Status = "Launching...";
var wjFolder = KnownFolders.CurrentDirectory.EnumerateDirectories() var wjFolder = KnownFolders.CurrentDirectory.EnumerateDirectories(recursive:false)
.OrderByDescending(v => .OrderByDescending(v =>
Version.TryParse(v.FileName.ToString(), out var ver) ? ver : new Version(0, 0, 0, 0)) Version.TryParse(v.FileName.ToString(), out var ver) ? ver : new Version(0, 0, 0, 0))
.FirstOrDefault(); .FirstOrDefault();

View File

@ -87,6 +87,7 @@ public struct RelativePath : IPath, IEquatable<RelativePath>, IComparable<Relati
public override int GetHashCode() public override int GetHashCode()
{ {
if (_hashCode != 0) return _hashCode; if (_hashCode != 0) return _hashCode;
if (Parts == null || Parts.Length == 0) return -1;
_hashCode = Parts.Aggregate(0, _hashCode = Parts.Aggregate(0,
(current, part) => current ^ part.GetHashCode(StringComparison.CurrentCultureIgnoreCase)); (current, part) => current ^ part.GetHashCode(StringComparison.CurrentCultureIgnoreCase));