aboutsummaryrefslogtreecommitdiffstats
path: root/libarchive/archive_write_set_format_cpio_newc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libarchive/archive_write_set_format_cpio_newc.c')
-rw-r--r--libarchive/archive_write_set_format_cpio_newc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libarchive/archive_write_set_format_cpio_newc.c b/libarchive/archive_write_set_format_cpio_newc.c
index 172fda62f0bb..f0f39809dad4 100644
--- a/libarchive/archive_write_set_format_cpio_newc.c
+++ b/libarchive/archive_write_set_format_cpio_newc.c
@@ -190,7 +190,7 @@ archive_write_newc_header(struct archive_write *a, struct archive_entry *entry)
const char *path;
size_t len;
- if (archive_entry_filetype(entry) == 0) {
+ if (archive_entry_filetype(entry) == 0 && archive_entry_hardlink(entry) == NULL) {
archive_set_error(&a->archive, -1, "Filetype required");
return (ARCHIVE_FAILED);
}