mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Merge pull request #279 from wabbajack-tools/duplicate-key-ini-fix
Implement fix for duplicate key error in FNV
This commit is contained in:
commit
9bae8a9c22
@ -7,6 +7,7 @@ using System.Threading;
|
||||
using System.Windows;
|
||||
using Alphaleonis.Win32.Filesystem;
|
||||
using IniParser;
|
||||
using IniParser.Model.Configuration;
|
||||
using IniParser.Parser;
|
||||
using Wabbajack.Common;
|
||||
using Wabbajack.Lib.CompilationSteps.CompilationErrors;
|
||||
@ -283,10 +284,11 @@ namespace Wabbajack.Lib
|
||||
|
||||
private void SetScreenSizeInPrefs()
|
||||
{
|
||||
var config = new IniParserConfiguration {AllowDuplicateKeys = true};
|
||||
foreach (var file in Directory.EnumerateFiles(Path.Combine(OutputFolder, "profiles"), "*refs.ini",
|
||||
DirectoryEnumerationOptions.Recursive))
|
||||
{
|
||||
var parser = new FileIniDataParser();
|
||||
var parser = new FileIniDataParser(new IniDataParser(config));
|
||||
var data = parser.ReadFile(file);
|
||||
if (data.Sections["Display"]["iSize W"] != null && data.Sections["Display"]["iSize H"] != null)
|
||||
{
|
||||
|
@ -143,6 +143,8 @@ namespace Wabbajack.Test
|
||||
new List<string>
|
||||
{
|
||||
"[Display]",
|
||||
"STestFile=f",
|
||||
"STestFile=",
|
||||
"iSize H=3",
|
||||
"iSize W=-200"
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user