]> Dogcows Code - chaz/tar/blobdiff - src/misc.c
tar: fix bug with -C and extracting directories
[chaz/tar] / src / misc.c
index 763c661e9ca704d6193633baaa3020628d217110..cb12947ac5aa4c3276b2a59af03c52a8d9062644 100644 (file)
@@ -728,7 +728,6 @@ chdir_do (int i)
 {
   if (chdir_current != i)
     {
-      static size_t counter;
       struct wd *curr = &wd[i];
       int fd = curr->fd;
 
@@ -736,7 +735,8 @@ chdir_do (int i)
        {
          if (! IS_ABSOLUTE_FILE_NAME (curr->name))
            chdir_do (i - 1);
-         fd = openat (chdir_fd, curr->name, open_searchdir_flags);
+         fd = openat (chdir_fd, curr->name,
+                      open_searchdir_flags & ~ O_NOFOLLOW);
          if (fd < 0)
            open_fatal (curr->name);
 
This page took 0.02468 seconds and 4 git commands to generate.