diff options
author | David Faure <faure@kde.org> | 2022-05-02 13:09:03 +0200 |
---|---|---|
committer | David Faure <faure@kde.org> | 2022-05-02 13:09:03 +0200 |
commit | c0774eec3af45477c72b60c402222f74620780ae (patch) | |
tree | 4abdc6c51d4f4e6a8667512246fba5f9c1f293c7 | |
parent | f09f11c42ea75c94dd4d911f3f518833fc7bc3f5 (diff) | |
download | shared-mime-info-work/dfaure/lmdb.tar.gz |
Add mimetype application/x-lmdbwork/dfaure/lmdb
Since it shares the *.mdb extension with msaccess,
added a tes file for msaccess, and gave a higher weight
to the msaccess glob for compatibility reasons (so that filename-only
matching of *.mdb still says msaccess).
Reference for the extensions: https://lmdb.readthedocs.io/en/release/
Reference for the magic: https://git.openldap.org/openldap/openldap/-/blob/mdb.master/libraries/liblmdb/mdb.c
Fixes: #168
-rw-r--r-- | data/freedesktop.org.xml.in | 13 | ||||
-rw-r--r-- | tests/mime-detection/data.mdb | bin | 0 -> 8192 bytes | |||
-rw-r--r-- | tests/mime-detection/list | 4 | ||||
-rwxr-xr-x | tests/mime-detection/msaccess.mdb | bin | 0 -> 65536 bytes |
4 files changed, 16 insertions, 1 deletions
diff --git a/data/freedesktop.org.xml.in b/data/freedesktop.org.xml.in index 8475b22d..aabc66c8 100644 --- a/data/freedesktop.org.xml.in +++ b/data/freedesktop.org.xml.in @@ -645,6 +645,17 @@ command to generate the output files. </magic> <glob pattern="*.lwp"/> </mime-type> + <mime-type type="application/x-lmdb"> + <comment>LMDB database</comment> + <acronym>LMDB</acronym> + <expanded-acronym>Lightning Memory-Mapped Database</expanded-acronym> + <generic-icon name="x-office-document"/> + <magic> + <match offset="16" type="little32" value="0xBEEFC0DE" /> + </magic> + <glob pattern="*.mdb" /> + <glob pattern="*.lmdb" /> + </mime-type> <mime-type type="application/vnd.ms-access"> <comment>JET database</comment> <acronym>JET</acronym> @@ -653,7 +664,7 @@ command to generate the output files. <magic> <match offset="0" type="string" value="\x00\x01\x00\x00Standard Jet DB" /> </magic> - <glob pattern="*.mdb" /> + <glob pattern="*.mdb" weight="60"/> <alias type="application/msaccess"/> <alias type="application/vnd.msaccess"/> <alias type="application/x-msaccess"/> diff --git a/tests/mime-detection/data.mdb b/tests/mime-detection/data.mdb Binary files differnew file mode 100644 index 00000000..af9ebbed --- /dev/null +++ b/tests/mime-detection/data.mdb diff --git a/tests/mime-detection/list b/tests/mime-detection/list index c300bec6..86405c73 100644 --- a/tests/mime-detection/list +++ b/tests/mime-detection/list @@ -921,3 +921,7 @@ test.zim application/x-openzim test.qs application/sparql-query # SPARQL query results test.srx application/sparql-results+xml ox +# LMDB (#168), file generated by baloo's basicindexingjobtest (LGPL) +data.mdb application/x-lmdb x +# MS Access DB, copied from Qt5's qtbase/tests/auto/sql/kernel/qsqldatabase/testdata/qtest.mdb (LGPL) +msaccess.mdb application/vnd.ms-access diff --git a/tests/mime-detection/msaccess.mdb b/tests/mime-detection/msaccess.mdb Binary files differnew file mode 100755 index 00000000..f388f192 --- /dev/null +++ b/tests/mime-detection/msaccess.mdb |