diff options
Diffstat (limited to 'src/wallet/rpc/backup.cpp')
-rw-r--r-- | src/wallet/rpc/backup.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/wallet/rpc/backup.cpp b/src/wallet/rpc/backup.cpp index c0912ffc70..228564fae4 100644 --- a/src/wallet/rpc/backup.cpp +++ b/src/wallet/rpc/backup.cpp @@ -5,6 +5,7 @@ #include <chain.h> #include <clientversion.h> #include <core_io.h> +#include <fs.h> #include <interfaces/chain.h> #include <key_io.h> #include <merkleblock.h> @@ -20,8 +21,10 @@ #include <wallet/rpc/util.h> #include <wallet/wallet.h> -#include <stdint.h> +#include <cstdint> +#include <fstream> #include <tuple> +#include <string> #include <boost/algorithm/string.hpp> @@ -521,7 +524,7 @@ RPCHelpMan importwallet() EnsureWalletIsUnlocked(*pwallet); - fsbridge::ifstream file; + std::ifstream file; file.open(fs::u8path(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"); @@ -729,7 +732,7 @@ RPCHelpMan dumpwallet() throw JSONRPCError(RPC_INVALID_PARAMETER, filepath.u8string() + " already exists. If you are sure this is what you want, move it out of the way first"); } - fsbridge::ofstream file; + std::ofstream file; file.open(filepath); if (!file.is_open()) throw JSONRPCError(RPC_INVALID_PARAMETER, "Cannot open wallet dump file"); |