mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
createFilesWithParentDirs(): Use binary mode to preserve original newlines on Windows
This commit is contained in:
parent
d4d778de77
commit
a61a950861
@ -31,7 +31,8 @@ void solidity::test::createFilesWithParentDirs(set<boost::filesystem::path> cons
|
||||
if (!path.parent_path().empty())
|
||||
boost::filesystem::create_directories(path.parent_path());
|
||||
|
||||
ofstream newFile(path.string());
|
||||
// Use binary mode to avoid line ending conversion on Windows.
|
||||
ofstream newFile(path.string(), std::ofstream::binary);
|
||||
newFile << _content;
|
||||
|
||||
if (newFile.fail() || !boost::filesystem::exists(path))
|
||||
|
Loading…
Reference in New Issue
Block a user