Honour the USTAR prefix field, this enables a 155 byte path length plus the normal 100 byte filename.
The catch is gnu tar cannot create archives that use the prefix field, you need to use s-tar.
This commit is contained in:
parent
419eed7501
commit
75762705a3
@ -71,7 +71,7 @@ file_header_t *get_header_tar(FILE *tar_stream)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* If there is no filename its an empty header, skip it */
|
/* If there is no filename its an empty header, skip it */
|
||||||
if (xstrlen(tar.formated.name) == 0) {
|
if (tar.formated.name[0] == 0) {
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -90,7 +90,11 @@ file_header_t *get_header_tar(FILE *tar_stream)
|
|||||||
|
|
||||||
/* convert to type'ed variables */
|
/* convert to type'ed variables */
|
||||||
tar_entry = xcalloc(1, sizeof(file_header_t));
|
tar_entry = xcalloc(1, sizeof(file_header_t));
|
||||||
|
if (tar.formated.prefix[0] == 0) {
|
||||||
tar_entry->name = xstrdup(tar.formated.name);
|
tar_entry->name = xstrdup(tar.formated.name);
|
||||||
|
} else {
|
||||||
|
tar_entry->name = concat_path_file(tar.formated.prefix, tar.formated.name);
|
||||||
|
}
|
||||||
|
|
||||||
tar_entry->mode = strtol(tar.formated.mode, NULL, 8);
|
tar_entry->mode = strtol(tar.formated.mode, NULL, 8);
|
||||||
#ifdef CONFIG_FEATURE_TAR_OLD_FORMAT
|
#ifdef CONFIG_FEATURE_TAR_OLD_FORMAT
|
||||||
|
Loading…
Reference in New Issue
Block a user