diff options
| author | Hanspeter Portner | 2019-08-16 23:40:19 +0200 |
|---|---|---|
| committer | Jason A. Donenfeld | 2020-02-26 09:57:40 +0800 |
| commit | 06671f4b2167951c6b46401b0f5ac8af4d48d50a (patch) | |
| tree | 99611b13d44424fa1eb27ea9c3700d9d535f432d /ui-snapshot.c | |
| parent | fde897b8171ed2e925b44ec6f69590ec07241017 (diff) | |
| download | cgit-06671f4b2167951c6b46401b0f5ac8af4d48d50a.tar.gz cgit-06671f4b2167951c6b46401b0f5ac8af4d48d50a.tar.bz2 cgit-06671f4b2167951c6b46401b0f5ac8af4d48d50a.zip | |
ui-snapshot: add support for lzip compression
This patch adds support for lzip [1] compressed snapshots (*.tar.lz)
[1] https://www.nongnu.org/lzip/
Signed-off-by: Hanspeter Portner <dev@open-music-kontrollers.ch>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'ui-snapshot.c')
| -rw-r--r-- | ui-snapshot.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ui-snapshot.c b/ui-snapshot.c index 9461d51..92cde42 100644 --- a/ui-snapshot.c +++ b/ui-snapshot.c | |||
| @@ -79,6 +79,12 @@ static int write_tar_bzip2_archive(const char *hex, const char *prefix) | |||
| 79 | return write_compressed_tar_archive(hex, prefix, argv); | 79 | return write_compressed_tar_archive(hex, prefix, argv); |
| 80 | } | 80 | } |
| 81 | 81 | ||
| 82 | static int write_tar_lzip_archive(const char *hex, const char *prefix) | ||
| 83 | { | ||
| 84 | char *argv[] = { "lzip", NULL }; | ||
| 85 | return write_compressed_tar_archive(hex, prefix, argv); | ||
| 86 | } | ||
| 87 | |||
| 82 | static int write_tar_xz_archive(const char *hex, const char *prefix) | 88 | static int write_tar_xz_archive(const char *hex, const char *prefix) |
| 83 | { | 89 | { |
| 84 | char *argv[] = { "xz", NULL }; | 90 | char *argv[] = { "xz", NULL }; |
| @@ -90,6 +96,7 @@ const struct cgit_snapshot_format cgit_snapshot_formats[] = { | |||
| 90 | { ".tar", "application/x-tar", write_tar_archive }, | 96 | { ".tar", "application/x-tar", write_tar_archive }, |
| 91 | { ".tar.gz", "application/x-gzip", write_tar_gzip_archive }, | 97 | { ".tar.gz", "application/x-gzip", write_tar_gzip_archive }, |
| 92 | { ".tar.bz2", "application/x-bzip2", write_tar_bzip2_archive }, | 98 | { ".tar.bz2", "application/x-bzip2", write_tar_bzip2_archive }, |
| 99 | { ".tar.lz", "application/x-lzip", write_tar_lzip_archive }, | ||
| 93 | { ".tar.xz", "application/x-xz", write_tar_xz_archive }, | 100 | { ".tar.xz", "application/x-xz", write_tar_xz_archive }, |
| 94 | { ".zip", "application/x-zip", write_zip_archive }, | 101 | { ".zip", "application/x-zip", write_zip_archive }, |
| 95 | { NULL } | 102 | { NULL } |
