|
@ -118,8 +118,11 @@ void dev::writeFile(std::string const& _file, bytesConstRef _data, bool _writeDe |
|
|
{ |
|
|
{ |
|
|
// create directory if not existent
|
|
|
// create directory if not existent
|
|
|
fs::path p(_file); |
|
|
fs::path p(_file); |
|
|
|
|
|
if (!fs::exists(p.parent_path())) |
|
|
|
|
|
{ |
|
|
fs::create_directories(p.parent_path()); |
|
|
fs::create_directories(p.parent_path()); |
|
|
fs::permissions(p.parent_path(), fs::owner_all); |
|
|
DEV_IGNORE_EXCEPTIONS(fs::permissions(p.parent_path(), fs::owner_all)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
ofstream s(_file, ios::trunc | ios::binary); |
|
|
ofstream s(_file, ios::trunc | ios::binary); |
|
|
s.write(reinterpret_cast<char const*>(_data.data()), _data.size()); |
|
|
s.write(reinterpret_cast<char const*>(_data.data()), _data.size()); |
|
|