[Git][reproducible-builds/diffoscope][master] comparators: xml: also recognize "GnuCash file" as XML

Chris Lamb (@lamby) gitlab at salsa.debian.org
Wed Dec 22 11:40:40 UTC 2021



Chris Lamb pushed to branch master at Reproducible Builds / diffoscope


Commits:
8258bd24 by Mattia Rizzolo at 2021-12-22T11:27:15+00:00
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 <mattia at debian.org>

- - - - -


1 changed file:

- diffoscope/comparators/xml.py


Changes:

=====================================
diffoscope/comparators/xml.py
=====================================
@@ -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):



View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/commit/8258bd2433b75d418b3a8d2b2d50193f8c3f0924

-- 
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/commit/8258bd2433b75d418b3a8d2b2d50193f8c3f0924
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20211222/267c9dc2/attachment.htm>


More information about the rb-commits mailing list