Age | Commit message (Collapse) | Author | Files | Lines |
|
$ file -b --mime-type don-quijoti-epub3.epub
application/epub+zip
|
|
|
|
|
|
|
|
|
|
MIME type is application/x-zstd:
$ lorem-ipsum-generator -p 10000 -l -f plain > lorem.txt
$ zstd lorem.txt
$ file -b --mime-type lorem.txt.zst
application/x-zstd
Test:
$ CFLAGS="-g -O0" ./autogen.sh --enable-magic --enable-packagekit --prefix=/usr && make && sudo make install
|
|
Changes:
Replace application/x-ar with application/x-archive
ar magic number: "!<arch>\n"
deb magic number (Debian 0.93+): "!<arch>\ndebian-binary"
REF:
https://en.wikipedia.org/wiki/Ar_(Unix)
https://en.wikipedia.org/wiki/Deb_(file_format)
Test:
$ touch a && touch b && ar r test.ar a b && cp test.ar test-2.a
$ xdg-mime query filetype test.ar
application/x-archive
$ xdg-mime query filetype dftp_2.2-1.deb
application/vnd.debian.binary-package
$ gio info test.ar | grep content-type
standard::content-type: application/x-archive
standard::fast-content-type: application/x-archive
$ gio info dftp_2.2-1.deb | grep content-type
standard::content-type: application/vnd.debian.binary-package
standard::fast-content-type: application/vnd.debian.binary-package
$ hexdump -C -n 8 test.ar
00000000 21 3c 61 72 63 68 3e 0a |!<arch>.|
00000008
$ hexdump -C -n 21 dftp_2.2-1.deb
00000000 21 3c 61 72 63 68 3e 0a 64 65 62 69 61 6e 2d 62 |!<arch>.debian-b|
00000010 69 6e 61 72 79 |inary|
00000015
$ ./autogen.sh --prefix=/usr --disable-magic && make && sudo make install
|
|
LHA media type is application/x-lzh-compressed
$ file --mime-type ~/test.lzh
/home/robert/test.lzh: application/x-lzh-compressed
|
|
|
|
This enables support for udeb (micro-deb) files, which are a package format used during bootstrapping a Debian installation. They have the same mimetype as regular deb files.
|
|
|
|
|
|
Patch by Mike Gabriel <[email protected]>
|
|
|
|
|
|
|
|
Closes #17 (https://github.com/mate-desktop/mate-file-archiver/issues/17)
|
|
choose unique name
add generic name
|
|
|
|
|