Reviewed by:

Submitted by:
Added the FTS_NOCHDIR flag to the fts-open call. This is needed, so that
the fts don't change the current directory for rm and subsequent calls
to rmdir with relative pathnames don't fail.
Pulled over the bugfix in 1.1.5.
This commit is contained in:
Andreas Schulz 1994-08-28 18:34:50 +00:00
parent 85b64443ae
commit a8c32ea5a1

View File

@ -141,8 +141,8 @@ rm_tree(argv)
#define SKIPPED 1
if (!(fts = fts_open(argv,
needstat ? FTS_PHYSICAL : FTS_PHYSICAL|FTS_NOSTAT,
(int (*)())NULL)))
needstat ? FTS_PHYSICAL|FTS_NOCHDIR :
FTS_PHYSICAL|FTS_NOSTAT|FTS_NOCHDIR, (int (*)())NULL)))
err(1, NULL);
while ((p = fts_read(fts)) != NULL) {
switch (p->fts_info) {