Check file extensions before trying to open.

This commit is contained in:
Jeff Young 2025-07-03 17:11:58 -06:00
parent fde693ebe1
commit e74f56c629

View File

@ -343,14 +343,13 @@ bool PGM_KICAD::OnPgmInit()
{
wxFileName fn( projToLoad );
if( fn.Exists() )
if( fn.Exists() && ( fn.GetExt() == FILEEXT::ProjectFileExtension
|| fn.GetExt() == FILEEXT::LegacyProjectFileExtension ) )
{
fn.MakeAbsolute();
if( appType == KICAD_MAIN_FRAME_T )
{
managerFrame->LoadProject( fn );
}
}
}
}