summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/libarchive/archive_entry_link_resolver.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libarchive/archive_entry_link_resolver.c b/lib/libarchive/archive_entry_link_resolver.c
index c190108..a5eb624 100644
--- a/lib/libarchive/archive_entry_link_resolver.c
+++ b/lib/libarchive/archive_entry_link_resolver.c
@@ -181,8 +181,10 @@ archive_entry_linkify(struct archive_entry_linkresolver *res,
/* If it has only one link, then we're done. */
if (archive_entry_nlink(*e) == 1)
return;
- /* Directories never have hardlinks. */
- if (archive_entry_filetype(*e) == AE_IFDIR)
+ /* Directories, devices never have hardlinks. */
+ if (archive_entry_filetype(*e) == AE_IFDIR
+ || archive_entry_filetype(*e) == AE_IFBLK
+ || archive_entry_filetype(*e) == AE_IFCHR)
return;
switch (res->strategy) {
OpenPOWER on IntegriCloud