From 8742f7fcadeedcd3c7d52d6da20c9812db995495 Mon Sep 17 00:00:00 2001 From: Alexander Date: Mon, 11 Nov 2019 21:01:07 +0200 Subject: [PATCH] Fixed bug when file doesn't save when clicking "Save As" --- Crypto Notepad/MainForm.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Crypto Notepad/MainForm.cs b/Crypto Notepad/MainForm.cs index 7ec7e8f..cf13d82 100644 --- a/Crypto Notepad/MainForm.cs +++ b/Crypto Notepad/MainForm.cs @@ -1159,6 +1159,7 @@ private async void SaveAsMainMenu_Click(object sender, EventArgs e) { return; } + PublicVar.openFileName = Path.GetFileName(saveFileDialog.FileName); EnterKeyForm enterKeyForm = new EnterKeyForm { Owner = this @@ -1172,6 +1173,10 @@ private async void SaveAsMainMenu_Click(object sender, EventArgs e) return; } } + if (TypedPassword.Value == null) + { + TypedPassword.Value = PublicVar.encryptionKey.Get(); + } PublicVar.encryptionKey.Set(TypedPassword.Value); filePath = saveFileDialog.FileName; mainMenu.Enabled = false;