Trycatch backup file creation

Stop putting PKHeX in Program Files ya goofballs
This commit is contained in:
Kurt 2022-03-25 19:25:07 -07:00
parent 6a96ad2278
commit 51f2fe35a4

View file

@ -824,8 +824,18 @@ namespace PKHeX.WinForms
{
var src = sav.Metadata.FilePath;
if (src is { } x && File.Exists(x))
{
try
{
File.Copy(x, backupName);
}
catch (Exception ex)
{
WinFormsUtil.Error(MsgBackupUnable, ex);
return false;
}
}
}
if (!FileUtil.IsFileLocked(path))
return true;