mirror of
https://github.com/monero-project/monero.git
synced 2025-08-08 13:52:20 -04:00
Add drop_and_recreate in privatefile class.
When creating a private file we need to delete the file if exist.
This commit is contained in:
parent
c8214782fb
commit
267e31f5b7
3 changed files with 26 additions and 5 deletions
|
@ -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"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue