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

fix rm -r

Submitted by:	John Hay -- John.Hay@mikom.csir.co.za
This commit is contained in:
Michael Haro 1999-08-29 19:57:03 +00:00
parent 0a2478e155
commit 0b93733576
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=50593

View File

@ -235,7 +235,8 @@ rm_tree(argv)
switch (p->fts_info) {
case FTS_DP:
case FTS_DNR:
if ((e=rmdir(p->fts_accpath)) || (fflag && errno == ENOENT)) {
if ((e=rmdir(p->fts_accpath)) == 0 ||
(fflag && errno == ENOENT)) {
if (e == 0 && vflag)
(void)printf("%s\n", p->fts_accpath);
continue;