X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Ffts-cycle.c;h=5f81610a359fdd1a50f0ab0b1372496a593e5381;hb=130023629006f4f08a04efa4a1564208ad8ed340;hp=19c5ded4c340df7005a45877915ed14337b57c6f;hpb=79c0a43808d9ca85acd04600149fc1a9b75bd1b9;p=gnulib.git diff --git a/lib/fts-cycle.c b/lib/fts-cycle.c index 19c5ded4c..5f81610a3 100644 --- a/lib/fts-cycle.c +++ b/lib/fts-cycle.c @@ -4,10 +4,10 @@ Written by Jim Meyering. - This program is free software; you can redistribute it and/or modify + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -15,12 +15,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#ifdef HAVE_CONFIG_H -# include -#endif + along with this program. If not, see . */ #include "cycle-check.h" #include "hash.h" @@ -144,7 +139,7 @@ leave_dir (FTS *fts, FTSENT *ent) else { FTSENT *parent = ent->fts_parent; - if (parent != NULL) + if (parent != NULL && 0 <= parent->fts_level) CYCLE_CHECK_REFLECT_CHDIR_UP (fts->fts_cycle.state, *(parent->fts_statp), *st); }