Skip to content

Commit 5e8975e

Browse files
committed
fs: consistently use fsbridge for fopen()
1 parent 486261d commit 5e8975e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/bitcoin-tx.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include <consensus/consensus.h>
1313
#include <core_io.h>
1414
#include <key_io.h>
15+
#include <fs.h>
1516
#include <policy/policy.h>
1617
#include <policy/rbf.h>
1718
#include <primitives/transaction.h>
@@ -158,7 +159,7 @@ static void RegisterLoad(const std::string& strInput)
158159
std::string key = strInput.substr(0, pos);
159160
std::string filename = strInput.substr(pos + 1, std::string::npos);
160161

161-
FILE *f = fopen(filename.c_str(), "r");
162+
FILE *f = fsbridge::fopen(filename.c_str(), "r");
162163
if (!f) {
163164
std::string strErr = "Cannot open file " + filename;
164165
throw std::runtime_error(strErr);

src/test/script_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -923,7 +923,7 @@ BOOST_AUTO_TEST_CASE(script_build)
923923
}
924924

925925
#ifdef UPDATE_JSON_TESTS
926-
FILE* file = fopen("script_tests.json.gen", "w");
926+
FILE* file = fsbridge::fopen("script_tests.json.gen", "w");
927927
fputs(strGen.c_str(), file);
928928
fclose(file);
929929
#endif

0 commit comments

Comments
 (0)