try to ensure on windows, but don't fail

This commit is contained in:
Michael 2019-07-18 10:42:30 +01:00
parent 9b40c0eb67
commit 53bccc4f23
No known key found for this signature in database
GPG Key ID: 2D51757B47E2434C

View File

@ -81,7 +81,6 @@ namespace llarp
{
errno = 0;
error_code_t ec = errno_error();
#ifndef WIN32
const auto str = pathname.string();
if(fs::exists(pathname, ec)) // file exists
{
@ -115,10 +114,13 @@ namespace llarp
}
}
#ifndef WIN32
if(ec)
llarp::LogError("failed to ensure ", str, ", ", ec.message());
#endif
return ec;
#else
return {};
#endif
}
} // namespace util
} // namespace llarp