diff options
author | Marc-André Lureau <marcandre.lureau@gmail.com> | 2011-10-07 14:25:37 +0200 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2011-11-04 12:03:59 +0000 |
commit | 199c7f30701f2f4e7507444758b5cbcd601ea3a4 (patch) | |
tree | b520712f6a47f57b65805fb3ca7cb59ef170597c | |
parent | 396f79bb13f03d6d721e3ace2ef9a871949dc55e (diff) | |
download | shared-mime-info-199c7f30701f2f4e7507444758b5cbcd601ea3a4.tar.gz |
Make PBM/PPM detection more permissive
The # comment character is optionnal.
See also https://bugs.freedesktop.org/show_bug.cgi?id=2359
https://bugs.freedesktop.org/show_bug.cgi?id=41555
-rw-r--r-- | freedesktop.org.xml.in | 42 |
1 files changed, 24 insertions, 18 deletions
diff --git a/freedesktop.org.xml.in b/freedesktop.org.xml.in index 8342c454..adcd1b3a 100644 --- a/freedesktop.org.xml.in +++ b/freedesktop.org.xml.in @@ -4275,14 +4275,16 @@ command to generate the output files. <sub-class-of type="image/x-portable-anymap"/> <magic priority="50"> <match type="string" value="P1" offset="0"> - <match type="byte" value="0x0a" offset="2"> - <match type="string" value="#" offset="3"/> - </match> + <match type="byte" value="0x0a" offset="2"/> + <match type="byte" value="0x20" offset="2"/> + <match type="byte" value="0x09" offset="2"/> + <match type="byte" value="0x0d" offset="2"/> </match> <match type="string" value="P4" offset="0"> - <match type="byte" value="0x0a" offset="2"> - <match type="string" value="#" offset="3"/> - </match> + <match type="byte" value="0x0a" offset="2"/> + <match type="byte" value="0x20" offset="2"/> + <match type="byte" value="0x09" offset="2"/> + <match type="byte" value="0x0d" offset="2"/> </match> </magic> <glob pattern="*.pbm"/> @@ -4294,14 +4296,16 @@ command to generate the output files. <sub-class-of type="image/x-portable-anymap"/> <magic priority="50"> <match type="string" value="P2" offset="0"> - <match type="byte" value="0x0a" offset="2"> - <match type="string" value="#" offset="3"/> - </match> + <match type="byte" value="0x0a" offset="2"/> + <match type="byte" value="0x20" offset="2"/> + <match type="byte" value="0x09" offset="2"/> + <match type="byte" value="0x0d" offset="2"/> </match> <match type="string" value="P5" offset="0"> - <match type="byte" value="0x0a" offset="2"> - <match type="string" value="#" offset="3"/> - </match> + <match type="byte" value="0x0a" offset="2"/> + <match type="byte" value="0x20" offset="2"/> + <match type="byte" value="0x09" offset="2"/> + <match type="byte" value="0x0d" offset="2"/> </match> </magic> <glob pattern="*.pgm"/> @@ -4313,14 +4317,16 @@ command to generate the output files. <sub-class-of type="image/x-portable-anymap"/> <magic priority="50"> <match type="string" value="P3" offset="0"> - <match type="byte" value="0x0a" offset="2"> - <match type="string" value="#" offset="3"/> - </match> + <match type="byte" value="0x0a" offset="2"/> + <match type="byte" value="0x20" offset="2"/> + <match type="byte" value="0x09" offset="2"/> + <match type="byte" value="0x0d" offset="2"/> </match> <match type="string" value="P6" offset="0"> - <match type="byte" value="0x0a" offset="2"> - <match type="string" value="#" offset="3"/> - </match> + <match type="byte" value="0x0a" offset="2"/> + <match type="byte" value="0x20" offset="2"/> + <match type="byte" value="0x09" offset="2"/> + <match type="byte" value="0x0d" offset="2"/> </match> </magic> <glob pattern="*.ppm"/> |