]> Dogcows Code - chaz/tar/blobdiff - src/extract.c
Update
[chaz/tar] / src / extract.c
index c699cb239abff2828ec24f44576f6d4b9588f0b6..92f5452a000a9283fa92e001712e8a035bf59156 100644 (file)
@@ -7,7 +7,7 @@
 
    This program is free software; you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published by the
 
    This program is free software; you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published by the
-   Free Software Foundation; either version 2, or (at your option) any later
+   Free Software Foundation; either version 3, or (at your option) any later
    version.
 
    This program is distributed in the hope that it will be useful, but
    version.
 
    This program is distributed in the hope that it will be useful, but
@@ -766,6 +766,7 @@ extract_file (char *file_name, int typeflag)
 
       if (fd < 0)
        {
 
       if (fd < 0)
        {
+         skip_member ();
          open_error (file_name);
          return 1;
        }
          open_error (file_name);
          return 1;
        }
@@ -913,10 +914,12 @@ create_placeholder_file (char *file_name, bool is_symlink, int *interdir_made)
 static int
 extract_link (char *file_name, int typeflag)
 {
 static int
 extract_link (char *file_name, int typeflag)
 {
-  char const *link_name = safer_name_suffix (current_stat_info.link_name,
-                                             true, absolute_names_option);
   int interdir_made = 0;
   int interdir_made = 0;
+  char const *link_name;
 
 
+  transform_member_name (&current_stat_info.link_name, xform_link);
+  link_name = current_stat_info.link_name;
+  
   if (! absolute_names_option && contains_dot_dot (link_name))
     return create_placeholder_file (file_name, false, &interdir_made);
 
   if (! absolute_names_option && contains_dot_dot (link_name))
     return create_placeholder_file (file_name, false, &interdir_made);
 
@@ -971,6 +974,8 @@ extract_symlink (char *file_name, int typeflag)
   int status;
   int interdir_made = 0;
 
   int status;
   int interdir_made = 0;
 
+  transform_member_name (&current_stat_info.link_name, xform_symlink);
+
   if (! absolute_names_option
       && (IS_ABSOLUTE_FILE_NAME (current_stat_info.link_name)
          || contains_dot_dot (current_stat_info.link_name)))
   if (! absolute_names_option
       && (IS_ABSOLUTE_FILE_NAME (current_stat_info.link_name)
          || contains_dot_dot (current_stat_info.link_name)))
This page took 0.020703 seconds and 4 git commands to generate.