Skip to content

Commit

Permalink
bugfix: ar archive mime should not match debian archives (#29)
Browse files Browse the repository at this point in the history
* bugfix: ar archive mime should not match debian archives

the new ar archive definition was erroneously matching Debian package archives (.deb) which led to the MIME being application/x-archive. This in turn resulted in the file is not being correctly unpacked by the extractor.
  • Loading branch information
jstucke committed Mar 29, 2023
1 parent 786b1c1 commit 17065a2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions fact_helper_file/mime/custom_mime_archives
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,9 @@
!:mime application/x-shar

# ar archive
0 string =!<arch>\n current ar archive
# we don't want to match .deb archives here and negative lookahead is not allowed
# this should be equivalent to '!<arch>\n(?!deb)'
0 regex =!<arch>\n([^d]..|.[^e].|..[^b]|$) current ar archive
!:mime application/x-archive
0 string =<ar> System V Release 1 ar archive
0 string =<ar> System V Release 1 ar archive
!:mime application/x-archive
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "fact_helper_file"
version = "0.2.15"
version = "0.2.16"
authors = [
{name = "Johannes vom Dorp"}
]
Expand Down

0 comments on commit 17065a2

Please sign in to comment.