diff --git a/daemon/lokinet-bootstrap.cpp b/daemon/lokinet-bootstrap.cpp index c7a6dc944..6bb17fabe 100644 --- a/daemon/lokinet-bootstrap.cpp +++ b/daemon/lokinet-bootstrap.cpp @@ -70,7 +70,8 @@ main(int argc, char* argv[]) std::string data{ss.str()}; if (data[0] == 'l' or data[0] == 'd') { - std::ofstream ofs{outputfile}; + fs::ofstream ofs{outputfile}; + ofs.exceptions(fs::ofstream::failbit); ofs << data; return 0; } diff --git a/llarp/util/fs.hpp b/llarp/util/fs.hpp index 96fe3bee8..cf4e9c787 100644 --- a/llarp/util/fs.hpp +++ b/llarp/util/fs.hpp @@ -14,7 +14,14 @@ namespace fs = ghc::filesystem; #else #include -namespace fs = std::filesystem; +namespace fs +{ + using namespace std::filesystem; + using ifstream = std::ifstream; + using ofstream = std::ofstream; + using fstream = std::fstream; +} // namespace fs + #endif #ifndef _MSC_VER