mirror of
https://github.com/sheumann/hush.git
synced 2024-12-22 14:30:31 +00:00
Fixup problem unconditionally converting all hard links to symlinks.
This commit is contained in:
parent
c989724316
commit
1b0075d243
@ -120,10 +120,6 @@ extern char get_header_tar(archive_handle_t *archive_handle)
|
|||||||
file_header->device = (dev_t) ((strtol(tar.formated.devmajor, NULL, 8) << 8) +
|
file_header->device = (dev_t) ((strtol(tar.formated.devmajor, NULL, 8) << 8) +
|
||||||
strtol(tar.formated.devminor, NULL, 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
|
#if defined CONFIG_FEATURE_TAR_OLDGNU_COMPATABILITY || defined CONFIG_FEATURE_TAR_GNU_EXTENSIONS
|
||||||
/* Fix mode, used by the old format */
|
/* Fix mode, used by the old format */
|
||||||
switch (tar.formated.typeflag) {
|
switch (tar.formated.typeflag) {
|
||||||
@ -133,8 +129,7 @@ extern char get_header_tar(archive_handle_t *archive_handle)
|
|||||||
file_header->mode |= S_IFREG;
|
file_header->mode |= S_IFREG;
|
||||||
break;
|
break;
|
||||||
case '1':
|
case '1':
|
||||||
// bb_error_msg("Internal hard link not supported");
|
bb_error_msg("WARNING: Converting hard link to symlink");
|
||||||
break;
|
|
||||||
case '2':
|
case '2':
|
||||||
file_header->mode |= S_IFLNK;
|
file_header->mode |= S_IFLNK;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user