Skip to content

Commit

Permalink
Ignore UTF-8 BOM when reading vibe.conf. Fixes #1470.
Browse files Browse the repository at this point in the history
  • Loading branch information
s-ludwig committed Apr 22, 2016
1 parent fb61620 commit 408c5e9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion source/vibe/core/args.d
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@ private string[] getConfigPaths()
// this is invoked by the first readOption call (at least vibe.core will perform one)
private void init()
{
import vibe.utils.string : stripUTF8Bom;

version (VibeDisableCommandLineParsing) {}
else g_args = Runtime.args;

Expand All @@ -205,7 +207,7 @@ private void init()
auto cpath = buildPath(spath, configName);
if (cpath.exists) {
scope(failure) logError("Failed to parse config file %s.", cpath);
auto text = cpath.readText();
auto text = stripUTF8Bom(cpath.readText());
g_config = text.parseJson();
g_haveConfig = true;
break;
Expand Down

0 comments on commit 408c5e9

Please sign in to comment.