diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2010-11-23 12:57:47 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2010-11-23 12:58:09 -0800 |
commit | 1584b72ff271e7f826dd64d7a1c7cd2f66504acb (patch) | |
tree | 40dd6aa95e2fd000863732d438d362b94aaecf8c | |
parent | 065cf0958c39600f2062cbeeb5b76929d03c207b (diff) | |
download | tar-1584b72ff271e7f826dd64d7a1c7cd2f66504acb.tar.gz |
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>.
-rw-r--r-- | src/extract.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/extract.c b/src/extract.c index 6711f873..c52c9ce8 100644 --- a/src/extract.c +++ b/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; |