Eeschema Eagle Import: More rigorous file header check
This commit is contained in:
parent
41f1f2cc48
commit
fa6d777ee0
|
@ -1782,9 +1782,11 @@ bool SCH_EAGLE_PLUGIN::CheckHeader( const wxString& aFileName )
|
||||||
wxString firstline;
|
wxString firstline;
|
||||||
// read the first line
|
// read the first line
|
||||||
firstline = tempFile.GetFirstLine();
|
firstline = tempFile.GetFirstLine();
|
||||||
|
wxString secondline = tempFile.GetNextLine();
|
||||||
|
wxString thirdline = tempFile.GetNextLine();
|
||||||
tempFile.Close();
|
tempFile.Close();
|
||||||
|
|
||||||
return firstline.StartsWith( "<?xml" );
|
return firstline.StartsWith( "<?xml" ) && secondline.StartsWith("<!DOCTYPE eagle SYSTEM") && thirdline.StartsWith("<eagle version");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue