From: Tim Kientzle Date: Sat, 14 Jun 2008 21:24:29 +0000 (-0400) Subject: Identify hardlinks with an initial 'h' in the mode string if there's X-Git-Tag: v2.6.0~176 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7ff90fb45f975732030514291e70fb2a1a5f6d3c;p=thirdparty%2Flibarchive.git Identify hardlinks with an initial 'h' in the mode string if there's no other filetype info available. SVN-Revision: 116 --- 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++)