Date: Tue, 16 Sep 1997 13:53:43 +0400 From: Dmitrij Tejblum <dima@tejblum.dnttm.rssi.ru> To: freebsd-current@freebsd.org Subject: FTS broken in -current Message-ID: <199709160953.NAA00917@tejblum.dnttm.rssi.ru>
next in thread | raw e-mail | index | archive | help
'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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199709160953.NAA00917>