diff options
| author | Riccardo Spagni <ric@spagni.net> | 2019-04-01 17:23:37 +0200 |
|---|---|---|
| committer | Riccardo Spagni <ric@spagni.net> | 2019-04-01 17:23:37 +0200 |
| commit | f13d38350a583b67e86feeff28c7cb8eece44fd3 (patch) | |
| tree | a305e1ece18634f04836dd95596d0fcee2ee19de /src/wallet/wallet2.cpp | |
| parent | 89fb0e3cd6ead1cb8e24ef94571d138e9e273dc0 (diff) | |
| parent | a8b98a0bd72b5cd230b69257d8f534a81a83bb18 (diff) | |
| download | monzero-core-f13d38350a583b67e86feeff28c7cb8eece44fd3.tar.gz monzero-core-f13d38350a583b67e86feeff28c7cb8eece44fd3.tar.xz monzero-core-f13d38350a583b67e86feeff28c7cb8eece44fd3.zip | |
Merge pull request #5297
a8b98a0b wallet: fix memory only wallets (moneromooo-monero)
Diffstat (limited to 'src/wallet/wallet2.cpp')
| -rw-r--r-- | src/wallet/wallet2.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 8010fff54..33b587585 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -3539,7 +3539,8 @@ void wallet2::change_password(const std::string &filename, const epee::wipeable_ decrypt_keys(original_password); setup_keys(new_password); rewrite(filename, new_password); - store(); + if (!filename.empty()) + store(); } //---------------------------------------------------------------------------------------------------- /*! @@ -5228,7 +5229,8 @@ std::string wallet2::path() const //---------------------------------------------------------------------------------------------------- void wallet2::store() { - store_to("", epee::wipeable_string()); + if (!m_wallet_file.empty()) + store_to("", epee::wipeable_string()); } //---------------------------------------------------------------------------------------------------- void wallet2::store_to(const std::string &path, const epee::wipeable_string &password) |
