mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-09-09 04:25:23 -05:00
Trycatch backup file creation
Stop putting PKHeX in Program Files ya goofballs
This commit is contained in:
@@ -824,7 +824,17 @@ private static bool TryBackupExportCheck(SaveFile sav, string path)
|
||||
{
|
||||
var src = sav.Metadata.FilePath;
|
||||
if (src is { } x && File.Exists(x))
|
||||
File.Copy(x, backupName);
|
||||
{
|
||||
try
|
||||
{
|
||||
File.Copy(x, backupName);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
WinFormsUtil.Error(MsgBackupUnable, ex);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!FileUtil.IsFileLocked(path))
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user