Nothing happens if no password was found and you press Decrypt

This commit is contained in:
2023-04-04 11:02:38 +02:00
parent ec33a6fb7a
commit 0b20150ab7

View File

@@ -61,9 +61,12 @@ sealed public partial class MainForm : Form
private void Decrypt(object sender, EventArgs e) private void Decrypt(object sender, EventArgs e)
{ {
ProcessBuilder pb = new ProcessBuilder(); if (ResultList.Text != null)
pb.ProcessFailed += (e) => MessageBox.Show(e.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); {
CopyAndNotify(pb.GetOutput("gpg.exe", $"--quiet --decrypt {PathRequest()}\\{ResultList.Text}"), ResultList.Text); ProcessBuilder pb = new ProcessBuilder();
Close(); pb.ProcessFailed += (e) => MessageBox.Show(e.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
CopyAndNotify(pb.GetOutput("gpg.exe", $"--quiet --decrypt {PathRequest()}\\{ResultList.Text}"), ResultList.Text);
Close();
}
} }
} }