mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Log invalid meta location
This commit is contained in:
parent
a3c8fb4c17
commit
9a71620061
@ -190,7 +190,7 @@ namespace Wabbajack.Common
|
||||
/// </summary>
|
||||
public static GameMetaData GetByFuzzyName(string someName)
|
||||
{
|
||||
return TryGetByFuzzyName(someName) ?? throw new ArgumentNullException($"{someName} could not be translated to a game");
|
||||
return TryGetByFuzzyName(someName) ?? throw new ArgumentNullException(nameof(someName), $"\"{someName}\" could not be translated to a game!");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -68,7 +68,8 @@ namespace Wabbajack.Lib.Downloaders
|
||||
|
||||
public static async Task<AbstractDownloadState> ResolveArchive(dynamic ini, bool quickMode = false)
|
||||
{
|
||||
var states = await Task.WhenAll(Downloaders.Select(d => (Task<AbstractDownloadState>)d.GetDownloaderState(ini, quickMode)));
|
||||
var states = await Task.WhenAll(Downloaders.Select(d =>
|
||||
(Task<AbstractDownloadState>)d.GetDownloaderState(ini, quickMode)));
|
||||
return states.FirstOrDefault(result => result != null);
|
||||
}
|
||||
|
||||
|
@ -58,6 +58,7 @@ namespace Wabbajack.Lib.Downloaders
|
||||
if (general.modID != null && general.fileID != null && general.gameName != null)
|
||||
{
|
||||
var game = GameRegistry.GetByFuzzyName((string)general.gameName).Game;
|
||||
|
||||
if (quickMode)
|
||||
{
|
||||
return new State
|
||||
|
@ -397,7 +397,15 @@ namespace Wabbajack.Lib
|
||||
{
|
||||
var metaname = filename.WithExtension(Consts.MetaFileExtension);
|
||||
if (!metaname.Exists) return true;
|
||||
return await DownloadDispatcher.ResolveArchive(metaname.LoadIniFile()) == null;
|
||||
try
|
||||
{
|
||||
return await DownloadDispatcher.ResolveArchive(metaname.LoadIniFile()) == null;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Utils.ErrorThrow(e, $"Exception while checking meta {filename}");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
var to_find = (await MO2DownloadsFolder.EnumerateFiles()
|
||||
|
Loading…
Reference in New Issue
Block a user