Mercurial > gnulib
changeset 27314:39fecdea3c73
* lib/fts.c (fts_safe_changedir): Add a comment.
author | Jim Meyering <jim@meyering.net> |
---|---|
date | Wed, 08 Nov 2006 13:49:24 +0000 |
parents | cb275a2f3240 |
children | 2614fc96376a |
files | ChangeLog lib/fts.c |
diffstat | 2 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Wed Nov 08 09:05:19 2006 +0000 +++ b/ChangeLog Wed Nov 08 13:49:24 2006 +0000 @@ -2,6 +2,7 @@ * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice. It's already included if !_LIBC. + (fts_safe_changedir): Add a comment. 2006-11-07 Paul Eggert <eggert@cs.ucla.edu>
--- a/lib/fts.c Wed Nov 08 09:05:19 2006 +0000 +++ b/lib/fts.c Wed Nov 08 13:49:24 2006 +0000 @@ -1505,6 +1505,11 @@ int ret; int newfd = fd; + + /* This clause handles the unusual case in which FTS_NOCHDIR + is specified, along with FTS_CWDFD. In that case, there is + no need to change even the virtual cwd file descriptor. + However, if FD is non-negative, we do close it here. */ if (ISSET(FTS_NOCHDIR)) { if (ISSET(FTS_CWDFD) && 0 <= fd) close (fd);