]> Dogcows Code - chaz/tar/blobdiff - src/extract.c
(sort_obstack): Fixed typo in the comment
[chaz/tar] / src / extract.c
index 29b8e9b4f1cf60cfe854fb65ee10108bd1899f06..e62671e985fb32076623a5c7a06f6c273c4d9e0a 100644 (file)
@@ -572,7 +572,7 @@ extract_archive (void)
   if (verbose_option)
     print_header (&current_stat_info, -1);
 
-  file_name = safer_name_suffix (current_stat_info.file_name, 0);
+  file_name = safer_name_suffix (current_stat_info.file_name, false);
   if (strip_path_elements)
     {
       size_t prefix_len = stripped_prefix_len (file_name, strip_path_elements);
@@ -601,9 +601,10 @@ extract_archive (void)
   /* Extract the archive entry according to its type.  */
 
   typeflag = current_header->header.typeflag;
-  /*KLUDGE*/
-  if (current_stat_info.archive_file_size != current_stat_info.stat.st_size)
-    typeflag = GNUTYPE_SPARSE;
+  /*KLUDGE */
+  if (current_format == POSIX_FORMAT
+      && current_stat_info.archive_file_size != current_stat_info.stat.st_size)
+         typeflag = GNUTYPE_SPARSE;
   
   switch (typeflag)
     {
@@ -860,7 +861,8 @@ extract_archive (void)
 
     again_link:
       {
-       char const *link_name = safer_name_suffix (current_stat_info.link_name, 1);
+       char const *link_name = safer_name_suffix (current_stat_info.link_name,
+                                                  true);
        struct stat st1, st2;
        int e;
 
This page took 0.020434 seconds and 4 git commands to generate.