diff options
author | Jesse Luehrs <doy@tozt.net> | 2020-05-22 01:09:14 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2020-05-22 01:09:14 -0400 |
commit | 1bc09a9c74d0d1c47d1b88b5833ad8174fc04928 (patch) | |
tree | 6a8142e3e1d3549e4e6328864a1a309f3b91ea76 | |
parent | 707f0bac2141ef7120c0493de3a5d331a511c40c (diff) | |
download | rbw-1bc09a9c74d0d1c47d1b88b5833ad8174fc04928.tar.gz rbw-1bc09a9c74d0d1c47d1b88b5833ad8174fc04928.zip |
drop in-memory keys when changing configuration
-rw-r--r-- | src/bin/rbw/commands.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/bin/rbw/commands.rs b/src/bin/rbw/commands.rs index f7cd6c2..6d90010 100644 --- a/src/bin/rbw/commands.rs +++ b/src/bin/rbw/commands.rs @@ -325,6 +325,10 @@ pub fn config_set(key: &str, value: &str) -> anyhow::Result<()> { } config.save().context("failed to save config file")?; + // drop in-memory keys, since they will be different if the email or url + // changed + lock()?; + Ok(()) } @@ -342,6 +346,10 @@ pub fn config_unset(key: &str) -> anyhow::Result<()> { } config.save().context("failed to save config file")?; + // drop in-memory keys, since they will be different if the email or url + // changed + lock()?; + Ok(()) } |