summaryrefslogtreecommitdiff
path: root/libarchive/archive_read_support_format_raw.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2017-03-26 20:29:34 -0400
committerMike Frysinger <vapier@gentoo.org>2019-04-21 23:04:16 +1000
commit0debf359fc2d4796aedab04d96c6e2046551b56e (patch)
tree9b2216f54e8fe82a0ef1876cc3957f28ae14d469 /libarchive/archive_read_support_format_raw.c
parent5405343bfd53830b3d018b2d982845de851aba5c (diff)
downloadlibarchive-0debf359fc2d4796aedab04d96c6e2046551b56e.tar.gz
support reading metadata from compressed files
The raw format provides very little metadata. Allow filters to pass back state that it knows about. With gzip, we know the original file name, mtime, and file size. For now, we only pull out the first two as those are available in the file header. The latter is in the file trailer, so we'll have to add support for that later (if we can seek the input).
Diffstat (limited to 'libarchive/archive_read_support_format_raw.c')
-rw-r--r--libarchive/archive_read_support_format_raw.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libarchive/archive_read_support_format_raw.c b/libarchive/archive_read_support_format_raw.c
index efa2c6a3..ec0520b6 100644
--- a/libarchive/archive_read_support_format_raw.c
+++ b/libarchive/archive_read_support_format_raw.c
@@ -120,7 +120,9 @@ archive_read_format_raw_read_header(struct archive_read *a,
archive_entry_set_filetype(entry, AE_IFREG);
archive_entry_set_perm(entry, 0644);
/* I'm deliberately leaving most fields unset here. */
- return (ARCHIVE_OK);
+
+ /* Let the filter fill out any fields it might have. */
+ return __archive_read_header(a, entry);
}
static int