Skip to content

Commit 812fe93

Browse files
committed
Fix an issue with txt setup xml writing
1 parent 334650c commit 812fe93

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

Windows Build Identifier/Program.cs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ private static int RunIdentifyAndReturnExitCode(IdentifyOptions opts)
417417

418418
if (result.Any(x => x.Location.ToLower().EndsWith(@"\txtsetup.sif")))
419419
{
420-
var txtsetups = result.Where(x => x.Location.EndsWith(@"\txtsetup.sif")).Select(x => x.Metadata.WindowsImageIndexes);
420+
var txtsetups = result.Where(x => x.Location.ToLower().EndsWith(@"\txtsetup.sif")).Select(x => x.Metadata.WindowsImageIndexes);
421421

422422
WindowsImageIndex[] indexes = null;
423423
foreach (var arr in txtsetups)
@@ -428,7 +428,9 @@ private static int RunIdentifyAndReturnExitCode(IdentifyOptions opts)
428428
}
429429
else
430430
{
431-
indexes.Concat(arr);
431+
var tmplist = indexes.ToList();
432+
tmplist.AddRange(arr);
433+
indexes = tmplist.ToArray();
432434
}
433435
}
434436

@@ -511,7 +513,7 @@ private static int RunIdentifyAndReturnExitCode(IdentifyOptions opts)
511513

512514
if (result.Any(x => x.Location.ToLower().EndsWith(@"\txtsetup.sif")))
513515
{
514-
var txtsetups = result.Where(x => x.Location.EndsWith(@"\txtsetup.sif")).Select(x => x.Metadata.WindowsImageIndexes);
516+
var txtsetups = result.Where(x => x.Location.ToLower().EndsWith(@"\txtsetup.sif")).Select(x => x.Metadata.WindowsImageIndexes);
515517

516518
WindowsImageIndex[] indexes = null;
517519
foreach (var arr in txtsetups)
@@ -522,7 +524,9 @@ private static int RunIdentifyAndReturnExitCode(IdentifyOptions opts)
522524
}
523525
else
524526
{
525-
indexes.Concat(arr);
527+
var tmplist = indexes.ToList();
528+
tmplist.AddRange(arr);
529+
indexes = tmplist.ToArray();
526530
}
527531
}
528532

0 commit comments

Comments
 (0)