mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-26 15:36:19 +01:00
Move boost/std fstream to fsbridge
This commit is contained in:
@@ -17,7 +17,6 @@
|
||||
|
||||
#include <wallet/rpcwallet.h>
|
||||
|
||||
#include <fstream>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
@@ -540,8 +539,8 @@ UniValue importwallet(const JSONRPCRequest& request)
|
||||
|
||||
EnsureWalletIsUnlocked(pwallet);
|
||||
|
||||
std::ifstream file;
|
||||
file.open(request.params[0].get_str().c_str(), std::ios::in | std::ios::ate);
|
||||
fsbridge::ifstream file;
|
||||
file.open(request.params[0].get_str(), std::ios::in | std::ios::ate);
|
||||
if (!file.is_open()) {
|
||||
throw JSONRPCError(RPC_INVALID_PARAMETER, "Cannot open wallet dump file");
|
||||
}
|
||||
@@ -717,8 +716,8 @@ UniValue dumpwallet(const JSONRPCRequest& request)
|
||||
throw JSONRPCError(RPC_INVALID_PARAMETER, filepath.string() + " already exists. If you are sure this is what you want, move it out of the way first");
|
||||
}
|
||||
|
||||
std::ofstream file;
|
||||
file.open(filepath.string().c_str());
|
||||
fsbridge::ofstream file;
|
||||
file.open(filepath);
|
||||
if (!file.is_open())
|
||||
throw JSONRPCError(RPC_INVALID_PARAMETER, "Cannot open wallet dump file");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user