changed file path to be multiplatform

This commit is contained in:
Liana Husikyan 2015-08-10 14:17:32 +02:00
parent f61107c1c9
commit c4dee49b96

View File

@ -303,7 +303,7 @@ void CommandLineInterface::createFile(string const& _fileName, string const& _da
// create directory if not existent
fs::path p(m_args["output-dir"].as<string>());
fs::create_directories(p);
ofstream outFile(m_args["output-dir"].as<string>() + "/" + _fileName);
ofstream outFile((p / _fileName).string());
outFile << _data;
if (!outFile)
BOOST_THROW_EXCEPTION(FileError() << errinfo_comment("Could not write to file: " + _fileName));