On Thu, Aug 28, 2008 at 03:24:14PM +0300, Elan Ruusamäe wrote:
> On Thursday 28 August 2008 15:09:10 Szymon Siwek wrote:
> > > it recognizes file as HFS first, then as PNG, which is wrong imho as PNG
> > > has pretty clear mime-magic.
> >
> > Are you sure? "file *.png" returns "data" for all PNGs on my builder.
> nope. just assumed :)
> 
> verified ... yeah seems so
> file-4.25-1.x86_64 - data
> file-4.23-2.amd64 - PNG image data
> 
> should be reported upstream as regression, or our patches cause this?
> 
It looks like upstream regression. I attached patch (but it's rather dirty
hack)

-- 
Szymon Siwek
--- file-4.25/src/softmagic.c.orig      2008-08-28 17:28:34.980714900 +0200
+++ file-4.25/src/softmagic.c   2008-08-28 17:29:27.977072582 +0200
@@ -665,8 +665,10 @@
                /* Null terminate and eat *trailing* return */
                p->s[sizeof(p->s) - 1] = '\0';
                len = strlen(p->s);
+               /* this breaks PNG detection
                if (len-- && p->s[len] == '\n')
                        p->s[len] = '\0';
+               */
                return 1;
        }
        case FILE_PSTRING: {
_______________________________________________
pld-devel-en mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-devel-en

Reply via email to