/[tar]/tar/src/create.c
ViewVC logotype

Diff of /tar/src/create.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.62 by eggert, Wed Sep 3 06:13:26 2003 UTC revision 1.63 by gray, Thu Sep 4 09:37:05 2003 UTC
# Line 402  write_long (const char *p, char type) Line 402  write_long (const char *p, char type)
402    set_next_block_after (header + (size - 1) / BLOCKSIZE);    set_next_block_after (header + (size - 1) / BLOCKSIZE);
403  }  }
404    
405    /* Write a long link name, depending on the current archive format */
406    static void
407    write_long_link (struct tar_stat_info *st)
408    {
409      if (archive_format == POSIX_FORMAT)
410        xheader_store ("linkpath", st);
411      else
412        write_long (st->link_name, GNUTYPE_LONGNAME);
413    }
414    
415  /* NOTE: Cross recursion between start_header and write_extended  */  /* NOTE: Cross recursion between start_header and write_extended  */
416    
417  static union block *  static union block *
# Line 1245  dump_file (char *p, int top_level, dev_t Line 1255  dump_file (char *p, int top_level, dev_t
1255                dup->nlink--;                dup->nlink--;
1256                                
1257                block_ordinal = current_block_ordinal ();                block_ordinal = current_block_ordinal ();
               if (NAME_FIELD_SIZE <= strlen (link_name))  
                 write_long (link_name, GNUTYPE_LONGLINK);  
1258                assign_string (&current_stat_info.link_name, link_name);                assign_string (&current_stat_info.link_name, link_name);
1259                  if (NAME_FIELD_SIZE <= strlen (link_name))
1260                    write_long_link (&current_stat_info);
1261    
1262                current_stat_info.stat.st_size = 0;                current_stat_info.stat.st_size = 0;
1263                header = start_header (p, &current_stat_info);                header = start_header (p, &current_stat_info);
# Line 1572  dump_file (char *p, int top_level, dev_t Line 1582  dump_file (char *p, int top_level, dev_t
1582                return;                return;
1583              }              }
1584            buffer[size] = '\0';            buffer[size] = '\0';
           if (size >= NAME_FIELD_SIZE)  
             write_long (buffer, GNUTYPE_LONGLINK);  
1585            assign_string (&current_stat_info.link_name, buffer);            assign_string (&current_stat_info.link_name, buffer);
1586              if (size >= NAME_FIELD_SIZE)
1587                write_long_link (&current_stat_info);
1588    
1589            block_ordinal = current_block_ordinal ();            block_ordinal = current_block_ordinal ();
1590            current_stat_info.stat.st_size = 0;   /* force 0 size on symlink */            current_stat_info.stat.st_size = 0;   /* force 0 size on symlink */

Legend:
Removed from v.1.62  
changed lines
  Added in v.1.63

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26