mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
changed file path to be multiplatform
This commit is contained in:
parent
f61107c1c9
commit
c4dee49b96
@ -303,7 +303,7 @@ void CommandLineInterface::createFile(string const& _fileName, string const& _da
|
|||||||
// create directory if not existent
|
// create directory if not existent
|
||||||
fs::path p(m_args["output-dir"].as<string>());
|
fs::path p(m_args["output-dir"].as<string>());
|
||||||
fs::create_directories(p);
|
fs::create_directories(p);
|
||||||
ofstream outFile(m_args["output-dir"].as<string>() + "/" + _fileName);
|
ofstream outFile((p / _fileName).string());
|
||||||
outFile << _data;
|
outFile << _data;
|
||||||
if (!outFile)
|
if (!outFile)
|
||||||
BOOST_THROW_EXCEPTION(FileError() << errinfo_comment("Could not write to file: " + _fileName));
|
BOOST_THROW_EXCEPTION(FileError() << errinfo_comment("Could not write to file: " + _fileName));
|
||||||
|
Loading…
Reference in New Issue
Block a user