Merge pull request #9270

267e31f Add drop_and_recreate in privatefile class. When creating a private file we need to delete the file if exist. (0xFFFC0000)
This commit is contained in:
luigi1111 2024-05-20 23:35:48 -05:00
commit b208eed32a
No known key found for this signature in database
GPG key ID: F4ACA0183641E010
3 changed files with 26 additions and 5 deletions

View file

@ -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"));