]> Dogcows Code - chaz/tar/blobdiff - src/create.c
Add cross-references
[chaz/tar] / src / create.c
index 99a15fcb2cacc01ed139609931c969602ab7134e..1b84fc860557bd7fee61e0888ccf98381485fdd3 100644 (file)
@@ -380,7 +380,7 @@ bool
 file_dumpable_p (struct tar_stat_info *st)
 {
   if (dev_null_output)
-    return totals_option && sparse_option && sparse_file_p (st);
+    return totals_option && sparse_option && ST_IS_SPARSE (st->stat);
   return !(st->archive_file_size == 0
           && (st->stat.st_mode & MODE_R) == MODE_R);
 }
@@ -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);
@@ -1497,7 +1499,7 @@ dump_file0 (struct tar_stat_info *st, const char *p,
        {
          enum dump_status status;
 
-         if (fd != -1 && sparse_option && sparse_file_p (st))
+         if (fd != -1 && sparse_option && ST_IS_SPARSE (st->stat))
            {
              status = sparse_dump_file (fd, st);
              if (status == dump_status_not_implemented)
This page took 0.020541 seconds and 4 git commands to generate.