From 4a086b52ca9b3fe330755fcf9e1c7a9c657927ee Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Mon, 13 Sep 1999 15:12:30 +0000 Subject: [PATCH] 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. --- bin/rm/rm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/rm/rm.c b/bin/rm/rm.c index 5a4f87a6838..c12872bc64d 100644 --- a/bin/rm/rm.c +++ b/bin/rm/rm.c @@ -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) -- 2.45.2