[Utilities] Fix OfflineList parsing (keep unhooked)

This commit is contained in:
Matt Nadareski
2018-01-15 12:53:32 -08:00
parent bcbcfc9780
commit 94cff12d28
2 changed files with 411 additions and 949 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1095,15 +1095,15 @@ namespace SabreTools.Library.Tools
// For everything else, we need to read it
try
{
// Get the first two lines to check
// Get the first two non-whitespace, non-comment lines to check
StreamReader sr = File.OpenText(filename);
string first = sr.ReadLine().ToLowerInvariant();
while (String.IsNullOrWhiteSpace(first))
while (String.IsNullOrWhiteSpace(first) || first.StartsWith("<!--"))
{
first = sr.ReadLine().ToLowerInvariant();
}
string second = sr.ReadLine().ToLowerInvariant();
while (String.IsNullOrWhiteSpace(second))
while (String.IsNullOrWhiteSpace(second) || second.StartsWith("<!--"))
{
second = sr.ReadLine().ToLowerInvariant();
}