4
0
Эх сурвалжийг харах

tar: work around FreeBSD symlink incompatibility with POSIX

* src/extract.c (maybe_recoverable): Treat EMLINK like ELOOP, for
FreeBSD.  Problem reported by Christian Weisgerber in
<http://lists.gnu.org/archive/html/bug-tar/2010-11/msg00080.html>.
Paul Eggert 14 жил өмнө
parent
commit
1584b72ff2
1 өөрчлөгдсөн 3 нэмэгдсэн , 0 устгасан
  1. 3 0
      src/extract.c

+ 3 - 0
src/extract.c

@@ -609,6 +609,9 @@ maybe_recoverable (char *file_name, bool regular, bool *interdir_made)
   switch (e)
     {
     case ELOOP:
+      /* With open ("symlink", O_NOFOLLOW|...), POSIX says errno == ELOOP,
+	 but FreeBSD through at least 8.1 uses errno == EMLINK.  */
+    case EMLINK:
       if (! regular
 	  || old_files_option != OVERWRITE_OLD_FILES || dereference_option)
 	break;