Re: Bug in file command magic
On Wed, 10 Feb 2010 06:02:02 -0500 (EST), Giovanni Funchal wrote:
>
> Hi,
>
> I've just noticed that the file command returns wrong mime for a file.
> In fact, if a LaTeX file uses the command \bibligraphystyle somewhere
> in the beginning, file will return mime "text/vnd.graphviz" instead of
> "text/x-tex". I took a look at /usr/share/file/magic (on Lenny), and
> it has something like :
>
> 0 regex/100 [\r\n\t\ ]*graph[\r\n\t\ ]*.*\\{ graphviz graph text
> !:mime text/vnd.graphviz
>
> This regular expression matches \biblioGRAPHystyle in the first
> thousand characters or so. A good fix would be :
>
> - 0 regex/100 [\r\n\t\ ]*graph[\r\n\t\ ]*.*\\{ graphviz graph text
> + 0 regex/100 (^|[\r\n\t\ ]+)graph[\r\n\t\ ]*.*\\{ graphviz graph text
>
> Since in the dot file format[1], the keyword "graph" must be preceded
> by a white space or be in the beginning of the file.
>
> Anyone knows where I can report this?
>
> [1] http://www.graphviz.org/doc/info/lang.html
According to the packages page on the Debian web site, /usr/share/file/magic
belongs to package libmagic1. I would suggest filing a bug report against
package libmagic1.
Reply to: