From 100a7d06eee6d3f60a1c2d00af53e4665c5f5690 Mon Sep 17 00:00:00 2001 From: 0xFFFC0000 <0xFFFC0000@proton.me> Date: Mon, 22 Apr 2024 14:32:12 +0000 Subject: Add drop_and_recreate in privatefile class. When creating a private file we need to delete the file if exist. --- src/wallet/wallet_rpc_server.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/wallet/wallet_rpc_server.cpp') diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp index 4e42d64cd..77074bc46 100644 --- a/src/wallet/wallet_rpc_server.cpp +++ b/src/wallet/wallet_rpc_server.cpp @@ -245,7 +245,7 @@ namespace tools ); std::string temp = "monero-wallet-rpc." + bind_port + ".login"; - rpc_login_file = tools::private_file::create(temp); + rpc_login_file = tools::private_file::drop_and_recreate(temp); if (!rpc_login_file.handle()) { LOG_ERROR(tr("Failed to create file ") << temp << tr(". Check permissions or remove file")); -- cgit v1.2.3