summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Uwe Broulik <kde@privat.broulik.de>2022-03-06 16:58:54 +0100
committerDavid Faure <faure@kde.org>2022-03-13 11:23:25 +0000
commitd4ecb04909d186050a31795b90f0d86917646714 (patch)
tree96364afff9a78cac82f71981b40811c9c2afbb4f
parentb5df32dc4cbd6b77671371384944c37225310af8 (diff)
Add Electron Archive Format type application/x-asar
Formerly known as "Atom Shell Archive Format" [1]. Unofficial MIME type also used by NPM "file-type" library [2]. [1] https://github.com/electron/asar [2] https://github.com/sindresorhus/file-type/blob/main/core.d.ts#L274
-rw-r--r--data/freedesktop.org.xml.in11
-rw-r--r--tests/mime-detection/extractthis.asarbin0 -> 467 bytes
-rw-r--r--tests/mime-detection/list2
3 files changed, 13 insertions, 0 deletions
diff --git a/data/freedesktop.org.xml.in b/data/freedesktop.org.xml.in
index 367483a..48605c2 100644
--- a/data/freedesktop.org.xml.in
+++ b/data/freedesktop.org.xml.in
@@ -1528,6 +1528,17 @@ command to generate the output files.
</magic>
<glob pattern="*.arj"/>
</mime-type>
+ <mime-type type="application/x-asar">
+ <comment>Electron Archive (ASAR)</comment>
+ <acronym>ASAR</acronym>
+ <expanded-acronym>Atom Shell Archive Format</expanded-acronym>
+ <magic priority="50">
+ <match type="string" value="\004\000\000\000" offset="0">
+ <match type="string" value="{&quot;files&quot;:" offset="16"/>
+ </match>
+ </magic>
+ <glob pattern="*.asar"/>
+ </mime-type>
<mime-type type="application/x-asp">
<comment>ASP page</comment>
<acronym>ASP</acronym>
diff --git a/tests/mime-detection/extractthis.asar b/tests/mime-detection/extractthis.asar
new file mode 100644
index 0000000..1f4934a
--- /dev/null
+++ b/tests/mime-detection/extractthis.asar
Binary files differ
diff --git a/tests/mime-detection/list b/tests/mime-detection/list
index 77c5d79..5c6f3bf 100644
--- a/tests/mime-detection/list
+++ b/tests/mime-detection/list
@@ -531,6 +531,8 @@ test.zz application/zlib ox
test.xar application/x-xar
# From https://bugs.freedesktop.org/show_bug.cgi?id=93549
serafettin.rar application/vnd.rar
+# From https://github.com/electron/asar/tree/main/test/input
+extractthis.asar application/x-asar
# Audio/Video files
# https://bugs.freedesktop.org/show_bug.cgi?id=20070#c4