svn commit: r201630 - head/usr.bin/unzip
Tim Kientzle
kientzle at FreeBSD.org
Wed Jan 6 06:35:11 UTC 2010
Author: kientzle
Date: Wed Jan 6 06:35:10 2010
New Revision: 201630
URL: http://svn.freebsd.org/changeset/base/201630
Log:
When restoring files, use the mode for the mode.
Thanks to: Jun Kuriyama for pointing this out
Modified:
head/usr.bin/unzip/unzip.c
Modified: head/usr.bin/unzip/unzip.c
==============================================================================
--- head/usr.bin/unzip/unzip.c Wed Jan 6 05:58:07 2010 (r201629)
+++ head/usr.bin/unzip/unzip.c Wed Jan 6 06:35:10 2010 (r201630)
@@ -383,7 +383,7 @@ extract_dir(struct archive *a, struct ar
{
int mode;
- mode = archive_entry_filetype(e) & 0777;
+ mode = archive_entry_mode(e) & 0777;
if (mode == 0)
mode = 0755;
@@ -425,7 +425,7 @@ extract_file(struct archive *a, struct a
ssize_t len;
unsigned char *p, *q, *end;
- mode = archive_entry_filetype(e) & 0777;
+ mode = archive_entry_mode(e) & 0777;
if (mode == 0)
mode = 0644;
mtime = archive_entry_mtime(e);
More information about the svn-src-head
mailing list