Skip to content
Snippets Groups Projects
Commit 8258bd24 authored by Mattia Rizzolo's avatar Mattia Rizzolo Committed by Chris Lamb
Browse files

comparators: xml: also recognize "GnuCash file" as XML


file says:

% file foo.gnucash
foo.gnucash: GnuCash file

gnucash files are, by default, gz-compressed, and file recognizes them
as such:

% file main.gnucash
main.gnucash: gzip compressed data, from Unix, original size modulo 2^32 1330067

But once uncompressed they are normal XML files, but somehow `file` has
its own filetype for them.

Signed-off-by: Mattia Rizzolo's avatarMattia Rizzolo <mattia@debian.org>
parent bf8d1091
No related branches found
No related tags found
1 merge request!98comparators: xml: also recognize "GnuCash file" as XML
Pipeline #330200 passed with warnings
......@@ -85,7 +85,7 @@ class XMLFile(File):
"""
DESCRIPTION = "XML files"
FILE_TYPE_RE = re.compile(r"^XML \S+ document")
FILE_TYPE_RE = re.compile(r"^(XML \S+ document|GnuCash file)")
@classmethod
def recognizes(cls, file):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment