From 02c6fc97b4c21d25ab596a25208fbe283e927f6a Mon Sep 17 00:00:00 2001 From: htuch Date: Wed, 1 Feb 2017 17:34:58 -0500 Subject: [PATCH] Open config file read-only. (#396) --- source/common/json/json_loader.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/common/json/json_loader.cc b/source/common/json/json_loader.cc index 314c6d733183..532210fdce60 100644 --- a/source/common/json/json_loader.cc +++ b/source/common/json/json_loader.cc @@ -207,7 +207,7 @@ class ObjectImplRoot : public ObjectImplBase { ObjectPtr Factory::LoadFromFile(const std::string& file_path) { rapidjson::Document document; - std::fstream file_stream(file_path); + std::ifstream file_stream(file_path); rapidjson::IStreamWrapper stream_wrapper(file_stream); if (document.ParseStream(stream_wrapper).HasParseError()) { throw Exception(fmt::format("Error(offset {}): {}\n", document.GetErrorOffset(),