aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CommandLineInterface.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/CommandLineInterface.cpp b/CommandLineInterface.cpp
index ff70616a..a5ad07d7 100644
--- a/CommandLineInterface.cpp
+++ b/CommandLineInterface.cpp
@@ -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));