mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-23 21:24:59 +00:00
enhance: secure exit
This commit is contained in:
parent
f4eca45754
commit
3aad24a64e
4 changed files with 15 additions and 11 deletions
|
@ -1,4 +1,3 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
|
||||
using Avalonia.Input;
|
||||
|
@ -41,13 +40,13 @@ namespace SourceGit.Views
|
|||
|
||||
private void CloseWindow(object _1, RoutedEventArgs _2)
|
||||
{
|
||||
Environment.Exit(-1);
|
||||
App.Quit(-1);
|
||||
}
|
||||
|
||||
private void SaveAndClose(object _1, RoutedEventArgs _2)
|
||||
{
|
||||
File.WriteAllText(_file, Editor.Text);
|
||||
Environment.Exit(0);
|
||||
App.Quit(0);
|
||||
}
|
||||
|
||||
private readonly string _file;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue