Skip to content

Commit

Permalink
Open config file read-only. (#396)
Browse files Browse the repository at this point in the history
  • Loading branch information
htuch authored and RomanDzhabarov committed Feb 1, 2017
1 parent 62b3edd commit 02c6fc9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/common/json/json_loader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 02c6fc9

Please sign in to comment.