diff options
Diffstat (limited to 'libdevcore/CommonIO.cpp')
-rw-r--r-- | libdevcore/CommonIO.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/libdevcore/CommonIO.cpp b/libdevcore/CommonIO.cpp index 97505b54..52829455 100644 --- a/libdevcore/CommonIO.cpp +++ b/libdevcore/CommonIO.cpp @@ -78,12 +78,24 @@ void dev::writeFile(std::string const& _file, bytesConstRef _data, bool _writeDe if (!fs::exists(p.parent_path())) { fs::create_directories(p.parent_path()); - DEV_IGNORE_EXCEPTIONS(fs::permissions(p.parent_path(), fs::owner_all)); + try + { + fs::permissions(p.parent_path(), fs::owner_all); + } + catch (...) + { + } } ofstream s(_file, ios::trunc | ios::binary); s.write(reinterpret_cast<char const*>(_data.data()), _data.size()); assertThrow(s, FileError, "Could not write to file: " + _file); - DEV_IGNORE_EXCEPTIONS(fs::permissions(_file, fs::owner_read|fs::owner_write)); + try + { + fs::permissions(_file, fs::owner_read|fs::owner_write); + } + catch (...) + { + } } } |