From 16b6e9065625e4049f220cb25c41cf07eaadef2e Mon Sep 17 00:00:00 2001 From: leo Date: Fri, 21 Jun 2024 18:23:32 +0800 Subject: [PATCH] fix: configuration of `gpg.ssh.program` was cleared on Preference windows closing. --- src/Views/Preference.axaml.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Views/Preference.axaml.cs b/src/Views/Preference.axaml.cs index bb91bc5b..16d7b3cd 100644 --- a/src/Views/Preference.axaml.cs +++ b/src/Views/Preference.axaml.cs @@ -189,7 +189,9 @@ namespace SourceGit.Views SetIfChanged(config, "commit.gpgsign", EnableGPGCommitSigning ? "true" : "false"); SetIfChanged(config, "tag.gpgsign", EnableGPGTagSigning ? "true" : "false"); SetIfChanged(config, "gpg.format", GPGFormat.Value); - SetIfChanged(config, $"gpg.{GPGFormat.Value}.program", GPGFormat.Value != "ssh" ? GPGExecutableFile : null); + + if (!GPGFormat.Value.Equals("ssh", StringComparison.Ordinal)) + SetIfChanged(config, $"gpg.{GPGFormat.Value}.program", GPGExecutableFile); Close(); }