diff options
author | Jim Meyering <jim@meyering.net> | 2006-11-08 13:49:24 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2006-11-08 13:49:24 +0000 |
commit | dc479a4b0ff98d587eb6bc42b5b73550f23ed815 (patch) | |
tree | 132c3360eb6b244f4dfabec39410d617cff2a714 /lib/fts.c | |
parent | 5dbdef67e74258d3331211eb11e5215adeea6cc8 (diff) | |
download | gnulib-dc479a4b0ff98d587eb6bc42b5b73550f23ed815.tar.gz |
* lib/fts.c (fts_safe_changedir): Add a comment.
Diffstat (limited to 'lib/fts.c')
-rw-r--r-- | lib/fts.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -1505,6 +1505,11 @@ fts_safe_changedir (FTS *sp, FTSENT *p, int fd, char const *dir) 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); |