From 252475f72eb72404fb7b19e2d62dfe23cf217e04 Mon Sep 17 00:00:00 2001 From: Maxim Baz Date: Tue, 19 Nov 2019 21:06:12 +0100 Subject: [PATCH 1/2] Remember relay password on receive too #177 --- src/cli/cli.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cli/cli.go b/src/cli/cli.go index ec0c0f4e..72c31f5c 100644 --- a/src/cli/cli.go +++ b/src/cli/cli.go @@ -334,6 +334,9 @@ func receive(c *cli.Context) (err error) { if crocOptions.SharedSecret == "" { crocOptions.SharedSecret = rememberedOptions.SharedSecret } + if !c.IsSet("pass") { + crocOptions.RelayPassword = rememberedOptions.RelayPassword + } } if crocOptions.SharedSecret == "" { From b27b814b49806eb67678c5387719e8578eece894 Mon Sep 17 00:00:00 2001 From: Maxim Baz Date: Tue, 19 Nov 2019 22:58:35 +0100 Subject: [PATCH 2/2] Switch to GlobalIsSet --- src/cli/cli.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cli/cli.go b/src/cli/cli.go index 72c31f5c..845a19ab 100644 --- a/src/cli/cli.go +++ b/src/cli/cli.go @@ -171,7 +171,7 @@ func send(c *cli.Context) (err error) { if !c.IsSet("code") { crocOptions.SharedSecret = rememberedOptions.SharedSecret } - if !c.IsSet("pass") { + if !c.GlobalIsSet("pass") { crocOptions.RelayPassword = rememberedOptions.RelayPassword } } @@ -334,7 +334,7 @@ func receive(c *cli.Context) (err error) { if crocOptions.SharedSecret == "" { crocOptions.SharedSecret = rememberedOptions.SharedSecret } - if !c.IsSet("pass") { + if !c.GlobalIsSet("pass") { crocOptions.RelayPassword = rememberedOptions.RelayPassword } }