When restoring files, use the mode for the mode.

Thanks to: Jun Kuriyama for pointing this out
This commit is contained in:
Tim Kientzle 2010-01-06 06:35:10 +00:00
parent 64c50c6403
commit 12255fe0d9

View File

@ -383,7 +383,7 @@ extract_dir(struct archive *a, struct archive_entry *e, const char *path)
{ {
int mode; int mode;
mode = archive_entry_filetype(e) & 0777; mode = archive_entry_mode(e) & 0777;
if (mode == 0) if (mode == 0)
mode = 0755; mode = 0755;
@ -425,7 +425,7 @@ extract_file(struct archive *a, struct archive_entry *e, const char *path)
ssize_t len; ssize_t len;
unsigned char *p, *q, *end; unsigned char *p, *q, *end;
mode = archive_entry_filetype(e) & 0777; mode = archive_entry_mode(e) & 0777;
if (mode == 0) if (mode == 0)
mode = 0644; mode = 0644;
mtime = archive_entry_mtime(e); mtime = archive_entry_mtime(e);