mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01:00
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.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user