diff options
-rw-r--r-- | archival/libunarchive/get_header_tar.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/archival/libunarchive/get_header_tar.c b/archival/libunarchive/get_header_tar.c index 365f464dd..e3b180748 100644 --- a/archival/libunarchive/get_header_tar.c +++ b/archival/libunarchive/get_header_tar.c | |||
@@ -120,6 +120,10 @@ extern char get_header_tar(archive_handle_t *archive_handle) | |||
120 | file_header->device = (dev_t) ((strtol(tar.formated.devmajor, NULL, 8) << 8) + | 120 | file_header->device = (dev_t) ((strtol(tar.formated.devmajor, NULL, 8) << 8) + |
121 | strtol(tar.formated.devminor, NULL, 8)); | 121 | strtol(tar.formated.devminor, NULL, 8)); |
122 | 122 | ||
123 | if (tar.formated.typeflag == '1') { | ||
124 | bb_error_msg("WARNING: Converting hard link to symlink"); | ||
125 | file_header->mode |= S_IFLNK; | ||
126 | } | ||
123 | #if defined CONFIG_FEATURE_TAR_OLDGNU_COMPATABILITY || defined CONFIG_FEATURE_TAR_GNU_EXTENSIONS | 127 | #if defined CONFIG_FEATURE_TAR_OLDGNU_COMPATABILITY || defined CONFIG_FEATURE_TAR_GNU_EXTENSIONS |
124 | /* Fix mode, used by the old format */ | 128 | /* Fix mode, used by the old format */ |
125 | switch (tar.formated.typeflag) { | 129 | switch (tar.formated.typeflag) { |
@@ -129,7 +133,7 @@ extern char get_header_tar(archive_handle_t *archive_handle) | |||
129 | file_header->mode |= S_IFREG; | 133 | file_header->mode |= S_IFREG; |
130 | break; | 134 | break; |
131 | case '1': | 135 | case '1': |
132 | bb_error_msg("Internal hard link not supported"); | 136 | // bb_error_msg("Internal hard link not supported"); |
133 | break; | 137 | break; |
134 | case '2': | 138 | case '2': |
135 | file_header->mode |= S_IFLNK; | 139 | file_header->mode |= S_IFLNK; |