]> Dogcows Code - chaz/tar/blobdiff - src/create.c
(print_total_stats): Add default case
[chaz/tar] / src / create.c
index 49b82b927221ee5e2d33d6a71f4cf1d04e8f8634..0d208d791c24586f50bc19c00fca7fe33d9271d5 100644 (file)
@@ -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
@@ -1182,7 +1182,7 @@ dump_dir (int fd, struct tar_stat_info *st, int top_level, dev_t parent_device)
 void
 create_archive (void)
 {
-  char *p;
+  const char *p;
 
   open_archive (ACCESS_WRITE);
   xheader_write_global ();
@@ -1387,7 +1387,7 @@ check_links (void)
    exit_status to failure, a clear diagnostic has been issued.  */
 
 static void
-dump_file0 (struct tar_stat_info *st, char const *p,
+dump_file0 (struct tar_stat_info *st, const char *p,
            int top_level, dev_t parent_device)
 {
   union block *header;
@@ -1404,6 +1404,8 @@ dump_file0 (struct tar_stat_info *st, char const *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);
@@ -1667,7 +1669,7 @@ dump_file0 (struct tar_stat_info *st, char const *p,
 }
 
 void
-dump_file (char *p, int top_level, dev_t parent_device)
+dump_file (const char *p, int top_level, dev_t parent_device)
 {
   struct tar_stat_info st;
   tar_stat_init (&st);
This page took 0.026764 seconds and 4 git commands to generate.