From 5e8975e2694c3178ae73deb28986e1fb5466147e Mon Sep 17 00:00:00 2001 From: fanquake Date: Fri, 24 Dec 2021 16:44:57 +0800 Subject: fs: consistently use fsbridge for fopen() --- src/bitcoin-tx.cpp | 3 ++- src/test/script_tests.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp index edec883264..8237d7d34f 100644 --- a/src/bitcoin-tx.cpp +++ b/src/bitcoin-tx.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -158,7 +159,7 @@ static void RegisterLoad(const std::string& strInput) std::string key = strInput.substr(0, pos); std::string filename = strInput.substr(pos + 1, std::string::npos); - FILE *f = fopen(filename.c_str(), "r"); + FILE *f = fsbridge::fopen(filename.c_str(), "r"); if (!f) { std::string strErr = "Cannot open file " + filename; throw std::runtime_error(strErr); diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp index eacd7ae894..0da296495f 100644 --- a/src/test/script_tests.cpp +++ b/src/test/script_tests.cpp @@ -923,7 +923,7 @@ BOOST_AUTO_TEST_CASE(script_build) } #ifdef UPDATE_JSON_TESTS - FILE* file = fopen("script_tests.json.gen", "w"); + FILE* file = fsbridge::fopen("script_tests.json.gen", "w"); fputs(strGen.c_str(), file); fclose(file); #endif -- cgit v1.2.3