From owner-freebsd-current Tue Sep 16 02:55:33 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id CAA15230 for current-outgoing; Tue, 16 Sep 1997 02:55:33 -0700 (PDT) Received: from helios.dnttm.ru (dnttm.wave.ras.ru [194.85.104.197]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id CAA15205 for ; Tue, 16 Sep 1997 02:55:24 -0700 (PDT) Received: (from uucp@localhost) by helios.dnttm.ru (8.8.5/8.8.5/IP-3) with UUCP id NAA08606 for freebsd-current@freebsd.org; Tue, 16 Sep 1997 13:51:38 +0400 Received: from tejblum.dnttm.rssi.ru (localhost [127.0.0.1]) by tejblum.dnttm.rssi.ru (8.8.7/8.8.5) with ESMTP id NAA00917 for ; Tue, 16 Sep 1997 13:53:44 +0400 (MSD) Message-Id: <199709160953.NAA00917@tejblum.dnttm.rssi.ru> X-Mailer: exmh version 2.0gamma 1/27/96 To: freebsd-current@freebsd.org Subject: FTS broken in -current Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 16 Sep 1997 13:53:43 +0400 From: Dmitrij Tejblum Sender: owner-freebsd-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 'rm -r' doesn't work if the name of directory has slash at the end. dima@tejblum|/usr/home/dima/misc>mkdir rmtest dima@tejblum|/usr/home/dima/misc>touch rmtest/a dima@tejblum|/usr/home/dima/misc>touch rmtest/b dima@tejblum|/usr/home/dima/misc>rm -r rmtest/ rm: rmtest: Operation not permitted rm: rmtest: Operation not permitted rm: rmtest: Directory not empty find -L is also broken. The problem is in the NAPPEND macro (in fts.c). Reverting it to the previous revision fixed the problem. An attempt to make a comment true also probably fixed the problem: --- fts.c.00 Sun Aug 31 13:47:24 1997 +++ fts.c Tue Sep 16 13:16:48 1997 @@ -745,11 +745,11 @@ /* * If not changing directories, reset the path back to original * state. */ if (ISSET(FTS_NOCHDIR)) { - if (cp - 1 > sp->fts_path) + if (len == cur->fts_pathlen) --cp; *cp = '\0'; } /* Dima