diff options
| author | Tim Kientzle <kientzle@FreeBSD.org> | 2005-09-21 03:12:45 +0000 |
|---|---|---|
| committer | Tim Kientzle <kientzle@FreeBSD.org> | 2005-09-21 03:12:45 +0000 |
| commit | 50352c825d6c11a6a9304aad7857f2f4caf65c2f (patch) | |
| tree | 8fa699bbd7a1133b6fa619ef7dd326e558563aed /lib/libarchive | |
| parent | 8912045c56ffcb64afeec6d469abb2c1ac0342f5 (diff) | |
Notes
Diffstat (limited to 'lib/libarchive')
| -rw-r--r-- | lib/libarchive/archive_read_extract.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/libarchive/archive_read_extract.c b/lib/libarchive/archive_read_extract.c index eb52e8edf87e..cde42b86db2b 100644 --- a/lib/libarchive/archive_read_extract.c +++ b/lib/libarchive/archive_read_extract.c @@ -1054,8 +1054,13 @@ set_perm(struct archive *a, int fd, struct archive_entry *entry, */ if (!S_ISLNK(archive_entry_mode(entry))) { #ifdef HAVE_FCHMOD - if (fd >= 0 && fchmod(fd, mode) == 0) - return (ARCHIVE_OK); + if (fd >= 0) { + if (fchmod(fd, mode) != 0) { + archive_set_error(a, errno, + "Can't set permissions"); + return (ARCHIVE_WARN); + } + } else #endif if (chmod(name, mode) != 0) { archive_set_error(a, errno, "Can't set permissions"); |
