mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Fix a few tests
This commit is contained in:
parent
55fb7e1467
commit
aaba7267bd
@ -295,16 +295,9 @@ namespace Wabbajack.Common
|
||||
File.AppendAllText(_path, text);
|
||||
}
|
||||
|
||||
public void CopyTo(AbsolutePath dest, bool useMove = false)
|
||||
public void CopyTo(AbsolutePath dest)
|
||||
{
|
||||
if (useMove)
|
||||
{
|
||||
File.Move(_path, dest._path, MoveOptions.ReplaceExisting);
|
||||
}
|
||||
else
|
||||
{
|
||||
File.Copy(_path, dest._path);
|
||||
}
|
||||
File.Copy(_path, dest._path);
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<string>> ReadAllLinesAsync()
|
||||
|
@ -57,14 +57,12 @@ namespace Wabbajack.Lib.Downloaders
|
||||
|
||||
if (general.modID != null && general.fileID != null && general.gameName != null)
|
||||
{
|
||||
var name = (string)general.gameName;
|
||||
var gameMeta = GameRegistry.GetByMO2ArchiveName(name);
|
||||
var game = gameMeta != null ? GameRegistry.GetByMO2ArchiveName(name).Game : GameRegistry.GetByNexusName(name).Game;
|
||||
var game = GameRegistry.GetByFuzzyName((string)general.gameName).Game;
|
||||
var client = await NexusApiClient.Get();
|
||||
dynamic info;
|
||||
ModInfo info;
|
||||
try
|
||||
{
|
||||
info = await client.GetModInfo(game, general.modID);
|
||||
info = await client.GetModInfo(game, long.Parse((string)general.modID));
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
@ -469,7 +469,7 @@ namespace Wabbajack.Test
|
||||
|
||||
using var tempFile = new TempFile();
|
||||
await converted.Download(new Archive {Name = "yt_test.zip"}, tempFile.Path);
|
||||
Assert.Equal(Hash.FromBase64("H166oHG0wpY="), await tempFile.Path.FileHashAsync());
|
||||
Assert.Equal(Hash.FromBase64("kD36zbA2X9Q="), await tempFile.Path.FileHashAsync());
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user