mirror of
https://git.savannah.gnu.org/git/tar.git
synced 2026-04-21 00:50:38 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user