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>.
This commit is contained in:
Paul Eggert
2010-11-23 12:57:47 -08:00
parent 065cf0958c
commit 1584b72ff2

View 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;