mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
a bit of code cleanup
This commit is contained in:
parent
51d62067d0
commit
8c4a1dd125
@ -102,7 +102,7 @@ namespace Wabbajack.Lib.Downloaders
|
||||
TOP:
|
||||
|
||||
if (!response.IsSuccessStatusCode)
|
||||
throw new HttpException((int)response.StatusCode, response.ReasonPhrase);
|
||||
return false;
|
||||
|
||||
Stream stream;
|
||||
try
|
||||
|
@ -54,7 +54,7 @@ namespace Wabbajack.BuildServer.Test
|
||||
[Fact]
|
||||
public async Task CanValidateModLists()
|
||||
{
|
||||
var modlists = await MakeModList("can_validate_file.txt");
|
||||
var modlists = await MakeModList("CanValidateModlistsFile.txt");
|
||||
Consts.ModlistMetadataURL = modlists.ToString();
|
||||
Utils.Log("Updating modlists");
|
||||
await RevalidateLists(true);
|
||||
@ -68,7 +68,7 @@ namespace Wabbajack.BuildServer.Test
|
||||
await CheckListFeeds(0, 1);
|
||||
|
||||
Utils.Log("Break List");
|
||||
var archive = "can_validate_file.txt".RelativeTo(Fixture.ServerPublicFolder);
|
||||
var archive = "CanValidateModlistsFile.txt".RelativeTo(Fixture.ServerPublicFolder);
|
||||
await archive.MoveToAsync(archive.WithExtension(new Extension(".moved")), true);
|
||||
|
||||
// We can revalidate but the non-nexus archives won't be checked yet since the list didn't change
|
||||
|
@ -139,14 +139,14 @@ namespace Wabbajack.Server.Services
|
||||
|
||||
if (!(archive.State is IUpgradingState))
|
||||
{
|
||||
_logger.Log(LogLevel.Information, $"Cannot heal {archive.State} because it's not a healable state");
|
||||
_logger.Log(LogLevel.Information, $"Cannot heal {archive.State.PrimaryKeyString} because it's not a healable state");
|
||||
return (archive, ArchiveStatus.InValid);
|
||||
}
|
||||
|
||||
var srcDownload = await _sql.GetArchiveDownload(archive.State.PrimaryKeyString, archive.Hash, archive.Size);
|
||||
if (srcDownload == null || srcDownload.IsFailed == true)
|
||||
{
|
||||
_logger.Log(LogLevel.Information, $"Cannot heal {archive.State} because it hasn't been previously successfully downloaded");
|
||||
_logger.Log(LogLevel.Information, $"Cannot heal {archive.State.PrimaryKeyString} because it hasn't been previously successfully downloaded");
|
||||
return (archive, ArchiveStatus.InValid);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user