Game name will not be converted if it already is

This commit is contained in:
erri120 2019-11-04 15:32:57 +01:00 committed by Timothy Baldridge
parent 1c9f960252
commit 609c5d309b

View File

@ -1,4 +1,5 @@
using Wabbajack.Common;
using System.Text.RegularExpressions;
using Wabbajack.Common;
namespace Wabbajack.Lib.NexusApi
{
@ -6,6 +7,8 @@ namespace Wabbajack.Lib.NexusApi
{
public static string ConvertGameName(string gameName)
{
if (Regex.IsMatch(gameName, @"^[^a-z\s]+\.[^a-z\s]+$"))
return gameName;
return GameRegistry.GetByMO2ArchiveName(gameName)?.NexusName ?? gameName.ToLower();
}