diff options
author | Jesse Young <jlyo@jlyo.org> | 2018-08-14 12:32:09 -0500 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2018-08-14 23:27:08 +0300 |
commit | 1d55b9488f2d9c6d367fa7f21b058466c24f3ad1 (patch) | |
tree | a90bbf36cf9a6d177ce560706794579a9479848f /src/archive.c | |
parent | e1a05c74cb8ae6ab41ee960343cc64a0a9af95a5 (diff) | |
download | apk-tools-1d55b9488f2d9c6d367fa7f21b058466c24f3ad1.tar.gz apk-tools-1d55b9488f2d9c6d367fa7f21b058466c24f3ad1.tar.bz2 apk-tools-1d55b9488f2d9c6d367fa7f21b058466c24f3ad1.tar.xz apk-tools-1d55b9488f2d9c6d367fa7f21b058466c24f3ad1.zip |
archive: enable FIFO extraction
Diffstat (limited to 'src/archive.c')
-rw-r--r-- | src/archive.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/archive.c b/src/archive.c index 9196cb2..bc36ce7 100644 --- a/src/archive.c +++ b/src/archive.c @@ -300,6 +300,9 @@ int apk_tar_parse(struct apk_istream *is, apk_archive_entry_parser parser, case '5': /* directory */ entry.mode |= S_IFDIR; break; + case '6': /* fifo */ + entry.mode |= S_IFIFO; + break; case 'g': /* global pax header */ break; case 'x': /* file specific pax header */ @@ -477,11 +480,10 @@ int apk_archive_entry_extract(int atfd, const struct apk_file_info *ae, if (r < 0) ret = -errno; atflags |= AT_SYMLINK_NOFOLLOW; break; - case S_IFSOCK: case S_IFBLK: case S_IFCHR: case S_IFIFO: - r = mknodat(atfd, fn, ae->mode & 07777, ae->device); + r = mknodat(atfd, fn, ae->mode, ae->device); if (r < 0) ret = -errno; break; } |