summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authormharo <mharo@FreeBSD.org>1999-08-29 19:57:03 +0000
committermharo <mharo@FreeBSD.org>1999-08-29 19:57:03 +0000
commit0e47c5f37aa42d57474a8cdde348dda79034669b (patch)
treefe86582c9ff8b432d65c025b47bfe82585fad5ce /bin
parent84de4ae03c8001e3df74f9fd3821db4a7342bcfd (diff)
downloadFreeBSD-src-0e47c5f37aa42d57474a8cdde348dda79034669b.zip
FreeBSD-src-0e47c5f37aa42d57474a8cdde348dda79034669b.tar.gz
fix rm -r
Submitted by: John Hay -- John.Hay@mikom.csir.co.za
Diffstat (limited to 'bin')
-rw-r--r--bin/rm/rm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/rm/rm.c b/bin/rm/rm.c
index 3f0da23..7467748 100644
--- a/bin/rm/rm.c
+++ b/bin/rm/rm.c
@@ -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;
OpenPOWER on IntegriCloud