mirror of
https://github.com/Crypto-Notepad/Crypto-Notepad.git
synced 2026-03-11 08:55:25 +00:00
Fixed bug with password corrupt while creating new file
This commit is contained in:
parent
a2a7d0db68
commit
e130e5d90f
1 changed files with 3 additions and 3 deletions
|
|
@ -990,18 +990,18 @@ private void NewMainMenu_Click(object sender, EventArgs e)
|
|||
PublicVar.openFileName = Path.GetFileName(filePath);
|
||||
}
|
||||
TypedPassword.Value = null;
|
||||
PublicVar.okPressed = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
saveFileDialog.FileName = "Unnamed.cnp";
|
||||
PublicVar.encryptionKey.Set(TypedPassword.Value);
|
||||
PublicVar.okPressed = false;
|
||||
if (saveFileDialog.ShowDialog() != DialogResult.OK)
|
||||
{
|
||||
TypedPassword.Value = null;
|
||||
return;
|
||||
}
|
||||
richTextBox.Clear();
|
||||
saveFileDialog.FileName = "Unnamed.cnp";
|
||||
PublicVar.encryptionKey.Set(TypedPassword.Value);
|
||||
StreamWriter sw = new StreamWriter(saveFileDialog.FileName);
|
||||
string NameWithotPath = Path.GetFileName(saveFileDialog.FileName);
|
||||
Text = PublicVar.appName + " – " + NameWithotPath;
|
||||
|
|
|
|||
Loading…
Reference in a new issue