Paul Eggert:

> If I understand things correctly, src/extract.c's extract_file
> is invoking open_output_file, which returns -1 with errno==ELOOP.
> extract_file then should invoke:
> 
>    maybe_recoverable ("./file1", true, &interdir_made)
> 
> maybe_recoverable should execute this code:
> 
>     if (*interdir_made)
>       return RECOVER_NO;
> 
>     switch (e)
>       {
>       case ELOOP:

The problem turns out to be very straightforward: On FreeBSD, the
open() call returns -1 with errno=EMLINK.  This is documented
behavior in FreeBSD's open(2) man page:

  [EMLINK]           O_NOFOLLOW was specified and the target is a symbolic
                     link.

Adding EMLINK to the ELOOP case in maybe_recoverable fixes this (and
doesn't break any other regression tests).

-- 
Christian "naddy" Weisgerber                          na...@mips.inka.de

Reply via email to