HOTFIX: Fix game file sources that don't have MO2 specific names

This commit is contained in:
Timothy Baldridge 2021-01-13 18:53:08 -07:00
parent 997587d674
commit c8abca742a
9 changed files with 29 additions and 21 deletions

View File

@ -1,7 +1,10 @@
### Changelog
#### Version - 2.4.1.1 - 1/13/2020
* HOTFIX: Fix game file sources that don't have MO2 specific names
#### Version - 2.4.1.0 - 1/12/2020
* Fix errors with broken SQL DBs crashing the system
* Fix errors with broken SQL DBs crashing the system
* Fix errors with bad SQL clean commands
* Warn when the user doesn't have enough swap space
* Better OS version detection

View File

@ -6,8 +6,8 @@
<AssemblyName>wabbajack-cli</AssemblyName>
<Company>Wabbajack</Company>
<Platforms>x64</Platforms>
<AssemblyVersion>2.4.1.0</AssemblyVersion>
<FileVersion>2.4.1.0</FileVersion>
<AssemblyVersion>2.4.1.1</AssemblyVersion>
<FileVersion>2.4.1.1</FileVersion>
<Copyright>Copyright © 2019-2020</Copyright>
<Description>An automated ModList installer</Description>
<PublishReadyToRun>true</PublishReadyToRun>

View File

@ -143,7 +143,6 @@ namespace Wabbajack.Common
{
return _path.StartsWith(s._path, StringComparison.OrdinalIgnoreCase);
}
public RelativePath Combine(params RelativePath[] paths )
{
return (RelativePath)Path.Combine(paths.Select(p => (string)p).Cons(_path).ToArray());

View File

@ -4,8 +4,8 @@
<OutputType>Exe</OutputType>
<TargetFramework>net5.0-windows</TargetFramework>
<UseWPF>true</UseWPF>
<AssemblyVersion>2.4.1.0</AssemblyVersion>
<FileVersion>2.4.1.0</FileVersion>
<AssemblyVersion>2.4.1.1</AssemblyVersion>
<FileVersion>2.4.1.1</FileVersion>
<Copyright>Copyright © 2019-2020</Copyright>
<Description>Wabbajack Application Launcher</Description>
<PublishReadyToRun>true</PublishReadyToRun>

View File

@ -198,7 +198,7 @@ namespace Wabbajack.Lib
return new IndexedArchive(
VFS.Index.ByRootPath[ag.MetaData().GameLocation().Combine(state.GameFile)])
{
IniData = ini, Meta = meta
IniData = ini, Meta = meta, Name = state.GameFile.Munge().ToString()
};
}));
}
@ -223,11 +223,13 @@ namespace Wabbajack.Lib
a.State = (await ResolveArchive(a)).State;
return null;
}
catch
catch (Exception ex)
{
Utils.Log(ex.ToString());
return a;
}
})).NotNull().ToHashSet();
}))
.NotNull().ToHashSet();
if (remove.Count == 0)
{
@ -509,20 +511,23 @@ namespace Wabbajack.Lib
Error(
$"No download metadata found for {archive.Name}, please use MO2 to query info or add a .meta file and try again.");
var result = new Archive(await DownloadDispatcher.ResolveArchive(archive.IniData));
var state = (AbstractDownloadState?)await DownloadDispatcher.ResolveArchive(archive.IniData);
if (result.State == null)
if (state == null)
Error($"{archive.Name} could not be handled by any of the downloaders");
result.Name = archive.Name ?? "";
result.Hash = archive.File.Hash;
result.Size = archive.File.Size;
var result = new Archive(state!)
{
Name = archive.Name ?? "",
Hash = archive.File.Hash,
Size = archive.File.Size
};
await result.State!.GetDownloader().Prepare();
var token = new CancellationTokenSource();
token.CancelAfter(Consts.MaxVerifyTime);
if (result.State != null && !await result.State.Verify(result, token.Token))
if (!await result.State.Verify(result, token.Token))
Error(
$"Unable to resolve link for {archive.Name}. If this is hosted on the Nexus the file may have been removed.");

View File

@ -98,7 +98,8 @@ namespace Wabbajack.Lib.Downloaders
public override string[] GetMetaIni()
{
return new[] {"[General]", $"gameName={Game.MetaData().MO2ArchiveName}", $"gameFile={GameFile}"};
var meta = Game.MetaData();
return new[] {"[General]", $"gameName={meta.MO2ArchiveName ?? meta.Game.ToString()}", $"gameFile={GameFile}"};
}
}

View File

@ -16,7 +16,7 @@ namespace Wabbajack.Lib.NexusApi
public class NexusFileInfo
{
public long category_id { get; set; }
public string category_name { get; set; } = string.Empty;
public string? category_name { get; set; } = null;
public string changelog_html { get; set; } = string.Empty;
public string description { get; set; } = string.Empty;
public string external_virus_scan_url { get; set; } = string.Empty;

View File

@ -3,8 +3,8 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0-windows</TargetFramework>
<AssemblyVersion>2.4.1.0</AssemblyVersion>
<FileVersion>2.4.1.0</FileVersion>
<AssemblyVersion>2.4.1.1</AssemblyVersion>
<FileVersion>2.4.1.1</FileVersion>
<Copyright>Copyright © 2019-2020</Copyright>
<Description>Wabbajack Server</Description>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>

View File

@ -6,8 +6,8 @@
<UseWPF>true</UseWPF>
<Platforms>x64</Platforms>
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
<AssemblyVersion>2.4.1.0</AssemblyVersion>
<FileVersion>2.4.1.0</FileVersion>
<AssemblyVersion>2.4.1.1</AssemblyVersion>
<FileVersion>2.4.1.1</FileVersion>
<Copyright>Copyright © 2019-2020</Copyright>
<Description>An automated ModList installer</Description>
<PublishReadyToRun>true</PublishReadyToRun>