Fixed bug when file doesn't save when clicking "Save As"

This commit is contained in:
Alexander 2019-11-11 21:01:07 +02:00
parent 336c6c1a25
commit 8742f7fcad

View file

@ -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;