detect_file_type(): update detection to handle last change in .kicad_mod files

These files can start now by "(module" or "(footprint".
This commit is contained in:
jean-pierre charras 2021-02-02 09:53:30 +01:00
parent 404eb535be
commit e3e03e09d0
1 changed files with 4 additions and 1 deletions

View File

@ -111,7 +111,10 @@ static IO_MGR::PCB_FILE_T detect_file_type( FILE* aFile, const wxFileName& aFile
reader.ReadLine();
char* line = reader.Line();
if( !strncasecmp( line, "(module", strlen( "(module" ) ) )
// first .kicad_mod file versions starts by "(module"
// recent .kicad_mod file versions starts by "(footprint"
if( strncasecmp( line, "(module", strlen( "(module" ) ) == 0
|| strncasecmp( line, "(footprint", strlen( "(footprint" ) ) == 0 )
{
file_type = IO_MGR::KICAD_SEXP;
*aName = aFileName.GetName();