diff options
author | Glenn L McGrath <bug1@ihug.co.nz> | 2003-06-12 13:47:16 +0000 |
---|---|---|
committer | Glenn L McGrath <bug1@ihug.co.nz> | 2003-06-12 13:47:16 +0000 |
commit | b838420fd53372e1777f7c4fe03804f28f8123db (patch) | |
tree | 667b36d2feac32ee6111e7a67f8abe8ae4b5c295 | |
parent | 24833430bc2dbea733c3b0b9ea6c6b976f95474a (diff) |
Handle hard links by converting them to symlinks
-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) file_header->device = (dev_t) ((strtol(tar.formated.devmajor, NULL, 8) << 8) + strtol(tar.formated.devminor, NULL, 8)); + if (tar.formated.typeflag == '1') { + bb_error_msg("WARNING: Converting hard link to symlink"); + file_header->mode |= S_IFLNK; + } #if defined CONFIG_FEATURE_TAR_OLDGNU_COMPATABILITY || defined CONFIG_FEATURE_TAR_GNU_EXTENSIONS /* Fix mode, used by the old format */ switch (tar.formated.typeflag) { @@ -129,7 +133,7 @@ extern char get_header_tar(archive_handle_t *archive_handle) file_header->mode |= S_IFREG; break; case '1': - bb_error_msg("Internal hard link not supported"); +// bb_error_msg("Internal hard link not supported"); break; case '2': file_header->mode |= S_IFLNK; |