mirror of
https://git.savannah.gnu.org/git/tar.git
synced 2026-09-18 22:24:15 +00:00
Honor the pax-option overrides when creating archive.
Changes proposed by Denis Excoffier. * NEWS: Fix typos. * doc/tar.texi: Fix typos. Improve recipe for creation of binary equivalent archives. * src/create.c (write_extended): Use the value of the --mtime option (if specified) as the default for exthdr.mtime. * src/xheader.c (xheader_store): Create the header if at least one override is supplied in --pax-option.
This commit is contained in:
+1
-1
@@ -706,7 +706,7 @@ write_extended (bool global, struct tar_stat_info *st, union block *old_header)
|
||||
{
|
||||
type = XHDTYPE;
|
||||
p = xheader_xhdr_name (st);
|
||||
t = st->stat.st_mtime;
|
||||
t = set_mtime_option ? mtime_option.tv_sec : st->stat.st_mtime;
|
||||
}
|
||||
xheader_write (type, p, t, &st->xhdr);
|
||||
free (p);
|
||||
|
||||
+3
-3
@@ -813,11 +813,11 @@ xheader_store (char const *keyword, struct tar_stat_info *st,
|
||||
t = locate_handler (keyword);
|
||||
if (!t || !t->coder)
|
||||
return;
|
||||
if (xheader_keyword_deleted_p (keyword)
|
||||
|| xheader_keyword_override_p (keyword))
|
||||
if (xheader_keyword_deleted_p (keyword))
|
||||
return;
|
||||
xheader_init (&st->xhdr);
|
||||
t->coder (st, keyword, &st->xhdr, data);
|
||||
if (!xheader_keyword_override_p (keyword))
|
||||
t->coder (st, keyword, &st->xhdr, data);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user