Don't abort on failure to backup file if it was never saved.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17810
This commit is contained in:
parent
39d9aba576
commit
0e0432d194
|
@ -1673,7 +1673,8 @@ void SCH_EDIT_FRAME::CheckForAutoSaveFile( const wxFileName& aFileName )
|
||||||
}
|
}
|
||||||
// Attempt to back up the last schematic file before overwriting it with the auto
|
// Attempt to back up the last schematic file before overwriting it with the auto
|
||||||
// save file.
|
// save file.
|
||||||
else if( !wxCopyFile( recoveredFn.GetFullPath(), backupFn.GetFullPath() ) )
|
else if( recoveredFn.Exists()
|
||||||
|
&& !wxCopyFile( recoveredFn.GetFullPath(), backupFn.GetFullPath() ) )
|
||||||
{
|
{
|
||||||
unrecoveredFiles.Add( recoveredFn.GetFullPath() );
|
unrecoveredFiles.Add( recoveredFn.GetFullPath() );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue