On Oct 24, 10:39am, [EMAIL PROTECTED] (Matt Taggart) wrote: -- Subject: libmagic1: proper way to use magic_load?
| I am following up on the changing behavior of magic_load to no longer | append .mime in new upstream versions. Looking at the example testmagic.c | program provided in the bug report at | | http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=500734 | | What behavior can I count on working on both old and new versions of | libmagic? | Is there one method I can use that will work on both or does some sort of | check need to be added? | How would you modify that program to work in both cases? Starting with file-4.26 mime entries have been folded into the standard magic file and there is not separate .mime file. The documentation was not updated, and now it has. Since the mime flag used to affect which database was consulted and now it affects which field from the magic entry gets returned providing backwards compatibility is not simple. One way could be if the magic.mime file is present and the mime flag is given switch to that I guess, but then the rest of the code needs to be changed to return the description from that file not the magic field. >From the PR I think that you should add the .mime and kill the mime flag, or I can try to provide backwards compatibility. christos -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]