diff options
author | Glenn L McGrath | 2003-11-27 00:01:43 +0000 |
---|---|---|
committer | Glenn L McGrath | 2003-11-27 00:01:43 +0000 |
commit | e39ee01821d537b3b249b0c136bb150734016c35 (patch) | |
tree | f80ff1767e2b0fc8ce022bf45e36ffc776e9e8f9 /archival/libunarchive/get_header_tar.c | |
parent | fea4b446df1b4d7c81804252ec7978092143f36e (diff) | |
download | busybox-e39ee01821d537b3b249b0c136bb150734016c35.zip busybox-e39ee01821d537b3b249b0c136bb150734016c35.tar.gz |
Fix tar hard links
Diffstat (limited to 'archival/libunarchive/get_header_tar.c')
-rw-r--r-- | archival/libunarchive/get_header_tar.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/archival/libunarchive/get_header_tar.c b/archival/libunarchive/get_header_tar.c index 603535a..561de1c 100644 --- a/archival/libunarchive/get_header_tar.c +++ b/archival/libunarchive/get_header_tar.c @@ -151,10 +151,9 @@ extern char get_header_tar(archive_handle_t *archive_handle) file_header->mode |= S_IFIFO; break; # endif - /* hard links are detected as entries with 0 size, a link name, - * and not being a symlink, hence we have nothing to do here */ + /* hard links are detected as regular files with 0 size and a link name */ case '1': - file_header->mode |= ~S_IFLNK; + file_header->mode &= (S_IFREG | 07777); break; # ifdef CONFIG_FEATURE_TAR_GNU_EXTENSIONS case 'L': { |