From 7ff90fb45f975732030514291e70fb2a1a5f6d3c Mon Sep 17 00:00:00 2001 From: Tim Kientzle Date: Sat, 14 Jun 2008 17:24:29 -0400 Subject: [PATCH] Identify hardlinks with an initial 'h' in the mode string if there's no other filetype info available. SVN-Revision: 116 --- libarchive/archive_entry_strmode.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libarchive/archive_entry_strmode.c b/libarchive/archive_entry_strmode.c index cfe6ae33b..0a0be3b42 100644 --- a/libarchive/archive_entry_strmode.c +++ b/libarchive/archive_entry_strmode.c @@ -57,6 +57,11 @@ archive_entry_strmode(struct archive_entry *entry) case AE_IFLNK: bp[0] = 'l'; break; case AE_IFSOCK: bp[0] = 's'; break; case AE_IFIFO: bp[0] = 'p'; break; + default: + if (archive_entry_hardlink(entry) != NULL) { + bp[0] = 'h'; + break; + } } for (i = 0; i < 9; i++) -- 2.47.3