]> Dogcows Code - chaz/tar/blobdiff - src/update.c
Update copyright years.
[chaz/tar] / src / update.c
index 5e9ab98ba2c30690505a145128b5e096966c8891..e9fad3f2ae48ab6a196c9b6aa85d4a76da9192ad 100644 (file)
@@ -1,7 +1,7 @@
 /* Update a tar archive.
 
-   Copyright 1988, 1992, 1994, 1996-1997, 1999-2001, 2003-2005, 2007, 2010,
-   2013 Free Software Foundation, Inc.
+   Copyright 1988, 1992, 1994, 1996-1997, 1999-2001, 2003-2005, 2007,
+   2010, 2013-2014 Free Software Foundation, Inc.
 
    This file is part of GNU tar.
 
@@ -145,16 +145,8 @@ update_archive (void)
                  {
                    if (S_ISDIR (s.st_mode))
                      {
-                       char *p, *dirp;
-                       DIR *stream = NULL;
-                       int fd = openat (chdir_fd, name->name,
-                                        open_read_flags | O_DIRECTORY);
-                       if (fd < 0)
-                         open_error (name->name);
-                       else if (! ((stream = fdopendir (fd))
-                                   && (dirp = streamsavedir (stream))))
-                         savedir_error (name->name);
-                       else
+                       char *p, *dirp = tar_savedir (name->name, 1);
+                       if (dirp)
                          {
                            namebuf_t nbuf = namebuf_create (name->name);
 
@@ -167,11 +159,6 @@ update_archive (void)
 
                            remname (name);
                          }
-
-                       if (stream
-                           ? closedir (stream) != 0
-                           : 0 <= fd && close (fd) != 0)
-                         savedir_error (name->name);
                      }
                    else if (tar_timespec_cmp (get_stat_mtime (&s),
                                               current_stat_info.mtime)
This page took 0.021882 seconds and 4 git commands to generate.