From 66292f7b150d73e8f055d20fb67141c72158fbdf Mon Sep 17 00:00:00 2001 From: tastytea Date: Thu, 26 Dec 2019 03:56:46 +0100 Subject: [PATCH] Convert paths to C strings in fstream initializers. --- src/config.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config.cpp b/src/config.cpp index bb4a879..664cce8 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -81,7 +81,7 @@ Config::Config(string profile) const fs::path filename = get_filename(); BOOST_LOG_TRIVIAL(debug) << "Config filename is: " << filename; - ifstream file{filename}; + ifstream file{filename.c_str()}; if (file.good()) { stringstream rawjson; @@ -267,7 +267,7 @@ void Config::write() _json[_profile]["titles_as_cw"] = data.titles_as_cw; _json[_profile]["titles_as_cw"] = data.titles_only; - ofstream file{get_filename()}; + ofstream file{get_filename().c_str()}; if (file.good()) { file << _json.toStyledString();