Problem with detecting Illustrator file
This Illustrator file (Oxycodone_PK.zip) is not being detected as such.
I'm not quite sure how this file got into this state. I'm guessing that it started life as a PDF file, then got opened in Illustrator, and then saved as an Illustrator file. So this is kind of a corner case...
The property you're keying off of (dc:format) is there, and has the correct value. It just seems to have been moved around a bit.
It looks like like simplemagic is sensitive to the exact location of the property. Moving the property to the top of the file seems to resolve this problem. See Oxycodone_PK-fixed.zip for an example.
Is there a way to make simplemagic less susceptible to these kinds of problems? Can it read the metadata directly?
@j256 Any idea if this can be fixed?
The problem with these is that this is a zip file. Being able to detect that it contains an Illustrator document requires different processing. I think it needs to be done but I'm not sure when I can get to it. Feel free to submit some code and I'll take a look at it.
@j256 I've attached zip files because I couldn't attach the .ai file directly. Please take a look at the Illustrator file in the zip file to test.