]> Dogcows Code - chaz/tar/blobdiff - src/update.c
tar: don't truncate diagnostic
[chaz/tar] / src / update.c
index de2786df3e86efc748692f0f5a6d585f220fd674..17f9e052047e91859f3afc29da8132d09cf6bd64 100644 (file)
@@ -130,6 +130,8 @@ update_archive (void)
 
            decode_header (current_header, &current_stat_info,
                           &current_format, 0);
+           transform_stat_info (current_header->header.typeflag,
+                                &current_stat_info);
            archive_format = current_format;
 
            if (subcommand_option == UPDATE_SUBCOMMAND
@@ -138,13 +140,12 @@ update_archive (void)
                struct stat s;
 
                chdir_do (name->change_dir);
-               if (deref_stat (dereference_option,
-                               current_stat_info.file_name, &s) == 0)
+               if (deref_stat (current_stat_info.file_name, &s) == 0)
                  {
                    if (S_ISDIR (s.st_mode))
                      {
                        char *p, *dirp;
-                       DIR *stream;
+                       DIR *stream = NULL;
                        int fd = openat (chdir_fd, name->name,
                                         open_read_flags | O_DIRECTORY);
                        if (fd < 0)
This page took 0.02194 seconds and 4 git commands to generate.