diff options
author | Tim Kientzle <kientzle@FreeBSD.org> | 2008-02-19 05:54:24 +0000 |
---|---|---|
committer | Tim Kientzle <kientzle@FreeBSD.org> | 2008-02-19 05:54:24 +0000 |
commit | 334a6ee707ca05705b78e445cc099da72efb0fc3 (patch) | |
tree | ed50f1aa98758b4259c683451eff8b5810f57ad7 /lib | |
parent | 4d9cfd1eb7deefc964d2778ec9e2b5d3ccda4df1 (diff) | |
download | src-334a6ee707ca05705b78e445cc099da72efb0fc3.tar.gz src-334a6ee707ca05705b78e445cc099da72efb0fc3.zip |
Simplify file type setting.
Notes
Notes:
svn path=/head/; revision=176402
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libarchive/archive_read_support_format_ar.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/libarchive/archive_read_support_format_ar.c b/lib/libarchive/archive_read_support_format_ar.c index 0094a3481c6c..5ce14b9d4ed1 100644 --- a/lib/libarchive/archive_read_support_format_ar.c +++ b/lib/libarchive/archive_read_support_format_ar.c @@ -268,8 +268,7 @@ archive_read_format_ar_read_header(struct archive_read *a, /* This must come before any call to _read_ahead. */ ar_parse_common_header(ar, entry, h); archive_entry_copy_pathname(entry, filename); - archive_entry_set_mode(entry, - S_IFREG | (archive_entry_mode(entry) & 0777)); + archive_entry_set_filetype(entry, AE_IFREG); /* Get the size of the filename table. */ number = ar_atol10(h + AR_size_offset, AR_size_size); if (number > SIZE_MAX) { @@ -375,8 +374,7 @@ archive_read_format_ar_read_header(struct archive_read *a, /* Parse the time, owner, mode, size fields. */ r = ar_parse_common_header(ar, entry, h); /* Force the file type to a regular file. */ - archive_entry_set_mode(entry, - S_IFREG | (archive_entry_mode(entry) & 0777)); + archive_entry_set_filetype(entry, AE_IFREG); return (r); } |