]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Minor fixups for the raw handler: Use "raw" as the name
authorTim Kientzle <kientzle@gmail.com>
Sat, 27 Feb 2010 20:11:42 +0000 (15:11 -0500)
committerTim Kientzle <kientzle@gmail.com>
Sat, 27 Feb 2010 20:11:42 +0000 (15:11 -0500)
for consistency, set filetype/perm to something that
would allow this entry to be reasonably extracted.

SVN-Revision: 1999

libarchive/archive_read_support_format_raw.c

index f159a216f10cd361a07dd700bc35b23b373058e0..89e6940d758e5b2a97532d75f66e428c41a06204 100644 (file)
@@ -114,9 +114,10 @@ archive_read_format_raw_read_header(struct archive_read *a,
                return (ARCHIVE_EOF);
 
        a->archive.archive_format = ARCHIVE_FORMAT_RAW;
-       a->archive.archive_format_name = "Raw data";
+       a->archive.archive_format_name = "raw";
        archive_entry_set_pathname(entry, "data");
-       /* XXX should we set mode to mimic a regular file? XXX */
+       archive_entry_set_filetype(entry, AE_IFREG);
+       archive_entry_set_perm(entry, 0644);
        /* I'm deliberately leaving most fields unset here. */
        return (ARCHIVE_OK);
 }