Ensure schematic autosave works if sheet path is invalid

This commit is contained in:
Jon Evans 2020-12-16 21:17:48 -05:00
parent a7ea63e610
commit a484d10470
1 changed files with 4 additions and 1 deletions

View File

@ -850,6 +850,9 @@ bool SCH_EDIT_FRAME::doAutoSave()
bool autoSaveOk = true; bool autoSaveOk = true;
if( fn.GetPath().IsEmpty() )
tmp.AssignDir( Prj().GetProjectPath() );
else
tmp.AssignDir( fn.GetPath() ); tmp.AssignDir( fn.GetPath() );
if( !tmp.IsOk() ) if( !tmp.IsOk() )