Skip to content

Commit

Permalink
fixing a critical bug with config files read from string and not a file
Browse files Browse the repository at this point in the history
  • Loading branch information
salaros committed Jun 26, 2018
1 parent b4159e2 commit c94f8c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ConfigParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ public ConfigParser(string configFile, ConfigParserSettings settings = null)
fileInfo = new FileInfo(configFile);
Settings.Encoding = Settings.Encoding ?? fileInfo.GetEncoding(true);
Settings.NewLine = fileInfo.DetectNewLine(configFile);
configFile = File.ReadAllText(configFile, Settings.Encoding ?? Encoding.UTF8);
}

configFile = File.ReadAllText(configFile, Settings.Encoding);
if (!string.IsNullOrWhiteSpace(configFile))
Read(configFile);
}
Expand Down

0 comments on commit c94f8c8

Please sign in to comment.