Date: Thu, 26 Nov 2009 19:20:04 GMT From: dfilter@FreeBSD.ORG (dfilter service) To: freebsd-bugs@FreeBSD.org Subject: Re: bin/133907: commit references a PR Message-ID: <200911261920.nAQJK4r9086661@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/133907; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: bin/133907: commit references a PR Date: Thu, 26 Nov 2009 19:11:56 +0000 (UTC) Author: jh Date: Thu Nov 26 19:11:44 2009 New Revision: 199844 URL: http://svn.freebsd.org/changeset/base/199844 Log: Reset path name back to original correctly in fts_build() when FTS_NOCHDIR option is used. fts_build() could strip a trailing slash from path name in post-order visit if a path pointing to an empty directory was given for fts_open(). PR: bin/133907, kern/134513 Reviewed by: das Approved by: trasz (mentor) MFC after: 1 month Modified: head/lib/libc/gen/fts.c Modified: head/lib/libc/gen/fts.c ============================================================================== --- head/lib/libc/gen/fts.c Thu Nov 26 19:09:10 2009 (r199843) +++ head/lib/libc/gen/fts.c Thu Nov 26 19:11:44 2009 (r199844) @@ -842,11 +842,8 @@ mem1: saved_errno = errno; * If not changing directories, reset the path back to original * state. */ - if (ISSET(FTS_NOCHDIR)) { - if (len == sp->fts_pathlen || nitems == 0) - --cp; - *cp = '\0'; - } + if (ISSET(FTS_NOCHDIR)) + sp->fts_path[cur->fts_pathlen] = '\0'; /* * If descended after called from fts_children or after called from _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200911261920.nAQJK4r9086661>