Bug 13059 - Ошибка в magic файле
Summary: Ошибка в magic файле
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: file (show other bugs)
Version: unstable
Hardware: all Linux
: P2 normal
Assignee: placeholder@altlinux.org
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-08 16:11 MSD by Sergey V Kovalyov
Modified: 2008-09-14 02:13 MSD (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey V Kovalyov 2007-10-08 16:11:16 MSD
Часть из /usr/share/file/magic:

# ZIP archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu)
0       string          PK\003\004
>4      byte            0x09            Zip archive data, at least v0.9 to extract
>4      byte            0x0a            Zip archive data, at least v1.0 to extract
>4      byte            0x0b            Zip archive data, at least v1.1 to extract
>4      byte            0x14
>>30    ubelong         !0x6d696d65     Zip archive data, at least v2.0 to extract
>0x161  string          WINZIP          Zip archive data, WinZIP self-extracting


# OpenOffice.org / KOffice / StarOffice documents
# From: Abel Cheung <abel@oaka.org>
# Listed here because they are basically zip files
>>30    string          mimetype

Из за строчки с WINZIP не определяются OO.org документы. Эта строчка должна быть
перенесена выше и быть как минимум над строкой

>4      byte            0x14
Comment 1 Sergey V Kovalyov 2007-10-11 17:10:46 MSD
И еще одна, но уже в /usr/share/file/magic.mime:

$ grep "TIFF image data" /usr/share/file/magic 
0       string          MM\x00\x2a      TIFF image data, big-endian
0       string          II\x2a\x00      TIFF image data, little-endian

$ grep -A4 "TIFF and friends" /usr/share/file/magic.mime
# TIFF and friends
#                                       TIFF file, big-endian
0       string          MM              image/tiff
#                                       TIFF file, little-endian
0       string          II              image/tiff

Проявялется вот так:

$ head -3 README.TXT; file README.TXT; file -i README.TXT 
IIS Migration Wizard
=====================

README.TXT: ASCII English text, with CRLF line terminators
README.TXT: image/tiff
Comment 2 Mikhail Gusarov 2008-06-13 13:00:39 MSD

    
Comment 3 Dmitry V. Levin 2008-09-13 18:23:20 MSD
Исправлено в версии 4.25
Comment 4 Dmitry V. Levin 2008-09-14 02:13:21 MSD
Should be fixed in 4.26-alt1