]> Dogcows Code - chaz/tar/commitdiff
tar: work around FreeBSD symlink incompatibility with POSIX
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 23 Nov 2010 20:57:47 +0000 (12:57 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 23 Nov 2010 20:58:09 +0000 (12:58 -0800)
* 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>.

src/extract.c

index 6711f8736951a3a541d85dec9c845a9bc5e38f97..c52c9ce8f13ccd24e0dc45e3da45a7633245db8b 100644 (file)
@@ -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;
This page took 0.022085 seconds and 4 git commands to generate.