]> Dogcows Code - chaz/tar/blobdiff - src/create.c
Added a comment
[chaz/tar] / src / create.c
index b6a4f52624291baf03cb996a39b3b2d3d8471536..78847555d83f80415b9e816917d431222ebb6208 100644 (file)
@@ -186,6 +186,8 @@ to_chars (int negative, uintmax_t value, size_t valsize,
        {
          int negsub;
          uintmax_t sub = substitute (&negsub) & maxval;
+         /* FIXME: This is the only place where GNU_FORMAT differs from
+             OLDGNU_FORMAT. Apart from this they are completely identical. */
          uintmax_t s = (negsub &= archive_format == GNU_FORMAT) ? - sub : sub;
          char subbuf[UINTMAX_STRSIZE_BOUND + 1];
          char *sub_string = STRINGIFY_BIGINT (s, subbuf + 1);
@@ -547,8 +549,9 @@ write_extended (struct tar_stat_info *st, union block *old_header, char type)
   size = extended_header.size;
 
   memcpy (hp.buffer, old_header, sizeof (hp));
-  
-  header = start_private_header ("././@PaxHeader", size);
+
+  header = start_private_header (p = xheader_xhdr_name (st), size);
+  free (p);
   header->header.typeflag = type;
 
   finish_header (st, header, -1);
@@ -981,9 +984,11 @@ dump_dir0 (char *directory,
          return;
        }
     }
-  else if (!recursion_option)
+
+  if (!recursion_option)
     return;
-  else if (one_file_system_option
+
+  if (one_file_system_option
           && !top_level
           && parent_device != stat->stat.st_dev)
     {
@@ -1179,7 +1184,7 @@ dump_hard_link (struct tar_stat_info *stat)
       if ((dup = hash_lookup (link_table, &lp)))
        {
          /* We found a link.  */
-         char const *link_name = safer_name_suffix (dup->name, 1);
+         char const *link_name = safer_name_suffix (dup->name, true);
 
          dup->nlink--;
              
@@ -1275,7 +1280,7 @@ dump_file0 (struct tar_stat_info *stat, char *p,
     return;
 
   assign_string (&stat->orig_file_name, p);
-  assign_string (&stat->file_name, safer_name_suffix (p, 0));
+  assign_string (&stat->file_name, safer_name_suffix (p, false));
 
   if (deref_stat (dereference_option, p, &stat->stat) != 0)
     {
This page took 0.021672 seconds and 4 git commands to generate.