X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fcreate.c;h=0d208d791c24586f50bc19c00fca7fe33d9271d5;hb=c027e039249b82c86eb947cae09a28b50dde30de;hp=99a15fcb2cacc01ed139609931c969602ab7134e;hpb=c2c2df6c939397b9330a675fdcecba4a8d99ea60;p=chaz%2Ftar diff --git a/src/create.c b/src/create.c index 99a15fc..0d208d7 100644 --- a/src/create.c +++ b/src/create.c @@ -730,7 +730,7 @@ start_header (struct tar_stat_info *st) } { - struct timespec mtime = st->mtime; + struct timespec mtime = set_mtime_option ? mtime_option : st->mtime; if (archive_format == POSIX_FORMAT) { if (MAX_OCTAL_VAL (header->header.mtime) < mtime.tv_sec @@ -1404,6 +1404,8 @@ dump_file0 (struct tar_stat_info *st, const char *p, assign_string (&st->file_name, safer_name_suffix (p, false, absolute_names_option)); + transform_name (&st->file_name); + if (deref_stat (dereference_option, p, &st->stat) != 0) { stat_diag (p);