Fix directory creation.

This commit is contained in:
chriseth 2018-10-04 14:55:32 +02:00
parent 6daeb39ecc
commit 56bbfce6d3

View File

@ -94,7 +94,7 @@ void dev::writeFile(std::string const& _file, bytesConstRef _data, bool _writeDe
{
// create directory if not existent
fs::path p(_file);
if (!fs::exists(p.parent_path()))
if (!p.parent_path().empty() && !fs::exists(p.parent_path()))
{
fs::create_directories(p.parent_path());
try