aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Böhler <witcher@wiredspace.de>2024-01-26 17:02:03 +0100
committerRobin Jarry <robin@jarry.cc>2024-01-26 20:27:08 +0100
commit58585e0a8e264f7a5500b3f24b0b319d59f36882 (patch)
treedb316cb892697768797daf864d80686dcbae3014
parentd1b5b8b5ab4abe41fbb077a6a7648563a2793b17 (diff)
downloadaerc-58585e0a8e264f7a5500b3f24b0b319d59f36882.tar.gz
compose: don't attach key when removing signature
If pgp-attach-key is set in accounts.conf, the key is detached with :detach and the signature removed with :sign, the key will be attached again. When :sign is called again two keys will be attached instead of one. Fix this by not attaching a key if it cannot be detached. Fixes: 9d90b70b4edf ("compose: refactor attachment handling") Signed-off-by: Thomas Böhler <witcher@wiredspace.de> Acked-by: Robin Jarry <robin@jarry.cc>
-rw-r--r--app/compose.go2
1 files changed, 0 insertions, 2 deletions
diff --git a/app/compose.go b/app/compose.go
index 56b8f350..4f369f38 100644
--- a/app/compose.go
+++ b/app/compose.go
@@ -344,8 +344,6 @@ func (c *Composer) SetAttachKey(attach bool) error {
if err != nil {
return fmt.Errorf("failed to delete attachment '%s: %w", name, err)
}
- } else {
- attach = !attach
}
}
if attach {