1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-19 02:29:40 +00:00

Fixed longstanding breakage of rm of deep directories in rev.1.2.

rm must not use FTS_NOCHDIR, since chdir'ing is required for removing
deep directory trees and the ability to remove such trees is required
by POSIX.2 and POLA.  The breakage didn't make much difference until
recently, since fts(3) didn't work in deep directory trees.  It isn't
clear whether using FTS_NOCHDIR ever fixed anything (Net/2's rm.c is
similar to Lite1's).  Perhaps it was actually to limit the damage
caused by the fts bug.
This commit is contained in:
Bruce Evans 1999-09-13 15:12:30 +00:00
parent 37d3877723
commit 4a086b52ca
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=51230

View File

@ -164,7 +164,7 @@ rm_tree(argv)
*/
#define SKIPPED 1
flags = FTS_PHYSICAL | FTS_NOCHDIR;
flags = FTS_PHYSICAL;
if (!needstat)
flags |= FTS_NOSTAT;
if (Wflag)