diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-03-01 16:28:39 +0000 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-04-03 12:32:32 +0200 |
commit | 2a5f574762614b74dee738392057200dd28c64fb (patch) | |
tree | 7b47462778a6dd5964eb0c2cc332276581b2615e /src/wallet/db.cpp | |
parent | bac5c9cf643e9333479ac667426d0b70f8f3aa7f (diff) |
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.
Diffstat (limited to 'src/wallet/db.cpp')
-rw-r--r-- | src/wallet/db.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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); |