summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorkientzle <kientzle@FreeBSD.org>2010-01-06 06:35:10 +0000
committerkientzle <kientzle@FreeBSD.org>2010-01-06 06:35:10 +0000
commitc2cd581d531966f04d35d5fc45c222795574bd1a (patch)
tree15178450af644b499506224c4a389a20e3bea7c1 /usr.bin
parentac4932bfb598d4cd46df580f5cb1bef84420375a (diff)
downloadFreeBSD-src-c2cd581d531966f04d35d5fc45c222795574bd1a.zip
FreeBSD-src-c2cd581d531966f04d35d5fc45c222795574bd1a.tar.gz
When restoring files, use the mode for the mode.
Thanks to: Jun Kuriyama for pointing this out
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/unzip/unzip.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/unzip/unzip.c b/usr.bin/unzip/unzip.c
index e5984ba..b271d81 100644
--- a/usr.bin/unzip/unzip.c
+++ b/usr.bin/unzip/unzip.c
@@ -383,7 +383,7 @@ extract_dir(struct archive *a, struct archive_entry *e, const char *path)
{
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 archive_entry *e, const char *path)
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);
OpenPOWER on IntegriCloud