Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Mar 2014 22:50:01 GMT
From:      dfilter@FreeBSD.ORG (dfilter service)
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/187264: commit references a PR
Message-ID:  <201403062250.s26Mo1Pq060596@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/187264; it has been noted by GNATS.

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/187264: commit references a PR
Date: Thu,  6 Mar 2014 22:47:18 +0000 (UTC)

 Author: jilles
 Date: Thu Mar  6 22:47:11 2014
 New Revision: 262872
 URL: http://svnweb.freebsd.org/changeset/base/262872
 
 Log:
   fts: Don't abort if an empty pathname is given.
   
   Make fts_open(3) treat an empty pathname like any other pathname that cannot
   be lstatted because of [ENOENT].
   
   It is rather confusing if  rm -rf file1 "" file2  does not remove file1 and
   file2.
   
   PR:		bin/187264
   MFC after:	2 weeks
 
 Modified:
   head/lib/libc/gen/fts.c
 
 Modified: head/lib/libc/gen/fts.c
 ==============================================================================
 --- head/lib/libc/gen/fts.c	Thu Mar  6 21:47:22 2014	(r262871)
 +++ head/lib/libc/gen/fts.c	Thu Mar  6 22:47:11 2014	(r262872)
 @@ -161,11 +161,7 @@ fts_open(argv, options, compar)
  
  	/* Allocate/initialize root(s). */
  	for (root = NULL, nitems = 0; *argv != NULL; ++argv, ++nitems) {
 -		/* Don't allow zero-length paths. */
 -		if ((len = strlen(*argv)) == 0) {
 -			errno = ENOENT;
 -			goto mem3;
 -		}
 +		len = strlen(*argv);
  
  		p = fts_alloc(sp, *argv, len);
  		p->fts_level = FTS_ROOTLEVEL;
 _______________________________________________
 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?201403062250.s26Mo1Pq060596>