From 2a5f574762614b74dee738392057200dd28c64fb Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Wed, 1 Mar 2017 16:28:39 +0000 Subject: Use fsbridge for fopen and freopen Abstracts away how a path is opened to a `FILE*`. Reduces the number of places where path is converted to a string for anything else but printing. --- src/wallet/db.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/wallet/db.cpp') diff --git a/src/wallet/db.cpp b/src/wallet/db.cpp index 050450247f..f47fc92b57 100644 --- a/src/wallet/db.cpp +++ b/src/wallet/db.cpp @@ -89,7 +89,7 @@ bool CDBEnv::Open(const fs::path& pathIn) dbenv->set_lg_max(1048576); dbenv->set_lk_max_locks(40000); dbenv->set_lk_max_objects(40000); - dbenv->set_errfile(fopen(pathErrorFile.string().c_str(), "a")); /// debug + dbenv->set_errfile(fsbridge::fopen(pathErrorFile, "a")); /// debug dbenv->set_flags(DB_AUTO_COMMIT, 1); dbenv->set_flags(DB_TXN_WRITE_NOSYNC, 1); dbenv->log_set_config(DB_LOG_AUTO_REMOVE, 1); -- cgit v1.2.3