View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000407 | file | General | public | 2022-11-28 15:06 | 2022-12-02 17:26 |
Reporter | manfredsc | Assigned To | christos | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Fixed in Version | 5.44 | ||||
Summary | 0000407: mime-type and extension not emitted for lzma | ||||
Description | # file test.txt.lzma test.txt.lzma: LZMA compressed data, non-streamed, size 5 # file --mime-type test.txt.lzma test.txt.lzma: application/octet-stream # file --extension test.txt.lzma test.txt.lzma: ??? The magic entry is as follows [magic/Magdir/compress]: # Type: LZMA 0 lelong&0xffffff =0x5d >12 leshort 0xff LZMA compressed data, !:mime application/x-lzma !:ext lzma >>5 lequad =0xffffffffffffffff streamed >>5 lequad !0xffffffffffffffff non-streamed, size %lld >12 leshort 0 LZMA compressed data, >>5 lequad =0xffffffffffffffff streamed >>5 lequad !0xffffffffffffffff non-streamed, size %lld If the mime entry is moved to the end of the block, the mime description is given just fine. So I suggest moving the "!:mime" and "!:ext" lines to the end. # Type: LZMA 0 lelong&0xffffff =0x5d >12 leshort 0xff LZMA compressed data, >>5 lequad =0xffffffffffffffff streamed >>5 lequad !0xffffffffffffffff non-streamed, size %lld >12 leshort 0 LZMA compressed data, >>5 lequad =0xffffffffffffffff streamed >>5 lequad !0xffffffffffffffff non-streamed, size %lld !:mime application/x-lzma !:ext lzma With this, I get # file --mime-type test.txt.lzma test.txt.lzma: application/x-lzma # file --extension test.txt.lzma test.txt.lzma: lzma | ||||
Tags | No tags attached. | ||||
|
|
|
Or, other possibility would be to duplicate the mime and ext entries, I'm not familiar enough with the magic format to decide which is better: # Type: LZMA 0 lelong&0xffffff =0x5d >12 leshort 0xff LZMA compressed data, !:mime application/x-lzma !:ext lzma >>5 lequad =0xffffffffffffffff streamed >>5 lequad !0xffffffffffffffff non-streamed, size %lld >12 leshort 0 LZMA compressed data, !:mime application/x-lzma !:ext lzma >>5 lequad =0xffffffffffffffff streamed >>5 lequad !0xffffffffffffffff non-streamed, size %lld |
|
Fixed, thanks |
Date Modified | Username | Field | Change |
---|---|---|---|
2022-11-28 15:06 | manfredsc | New Issue | |
2022-11-28 15:06 | manfredsc | File Added: test.txt.lzma | |
2022-11-28 15:23 | manfredsc | Note Added: 0003866 | |
2022-12-02 17:26 | christos | Assigned To | => christos |
2022-12-02 17:26 | christos | Status | new => resolved |
2022-12-02 17:26 | christos | Resolution | open => fixed |
2022-12-02 17:26 | christos | Fixed in Version | => 5.44 |
2022-12-02 17:26 | christos | Note Added: 0003867 |