From d60df66811a53e130fc03128c64954c1bee533aa Mon Sep 17 00:00:00 2001 From: scrawl Date: Wed, 11 Jun 2014 16:17:48 +0200 Subject: [PATCH] Change openmw.log to boost ofstream to fix unicode path on windows (see https://github.com/OpenMW/openmw/pull/108) --- apps/openmw/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/openmw/main.cpp b/apps/openmw/main.cpp index 338eb2a7c..503ccaf25 100644 --- a/apps/openmw/main.cpp +++ b/apps/openmw/main.cpp @@ -10,6 +10,7 @@ #include #include +#include #if defined(_WIN32) // For OutputDebugString @@ -309,7 +310,8 @@ int main(int argc, char**argv) std::cerr.rdbuf (&sb); #else // Redirect cout and cerr to openmw.log - std::ofstream logfile (std::string(cfgMgr.getLogPath().string() + "/openmw.log").c_str()); + boost::filesystem::ofstream logfile (boost::filesystem::path( + cfgMgr.getLogPath() / "/openmw.log")); boost::iostreams::stream_buffer coutsb; std::ostream oldcout(cout_rdbuf);