Module Name:    src
Committed By:   mbalmer
Date:           Sat Jan  9 09:27:42 UTC 2010

Modified Files:
        src/usr.bin/unzip: unzip.c

Log Message:
When restoring files, use the mode, not the filetype, for the mode.
>From FreeBSD (r201630)


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/unzip/unzip.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/unzip/unzip.c
diff -u src/usr.bin/unzip/unzip.c:1.10 src/usr.bin/unzip/unzip.c:1.11
--- src/usr.bin/unzip/unzip.c:1.10	Sun Oct 25 20:14:50 2009
+++ src/usr.bin/unzip/unzip.c	Sat Jan  9 09:27:42 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: unzip.c,v 1.10 2009/10/25 20:14:50 wiz Exp $ */
+/* $NetBSD: unzip.c,v 1.11 2010/01/09 09:27:42 mbalmer Exp $ */
 
 /*-
  * Copyright (c) 2009 Joerg Sonnenberger <[email protected]>
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: unzip.c,v 1.10 2009/10/25 20:14:50 wiz Exp $");
+__RCSID("$NetBSD: unzip.c,v 1.11 2010/01/09 09:27:42 mbalmer Exp $");
 
 #include <sys/queue.h>
 #include <sys/stat.h>
@@ -388,7 +388,7 @@
 {
 	int mode;
 
-	mode = archive_entry_filetype(e) & 0777;
+	mode = archive_entry_mode(e) & 0777;
 	if (mode == 0)
 		mode = 0755;
 
@@ -472,7 +472,7 @@
 	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);

Reply via email to