1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-08-05 08:10:15 +02:00

(process_entry): Handle FTW_DCHP.

(ftw_dir): Handle FTW_DCH.
This commit is contained in:
Jim Meyering
2003-01-22 15:45:48 +00:00
parent 5b7ab2372d
commit f0a528b13a
+10
View File
@@ -398,6 +398,12 @@ process_entry (struct ftw_data *data, struct dir_data *dir, const char *name,
if (__chdir ("..") < 0)
result = -1;
}
if (result < 0)
{
result = (*data->func) (data->dirbuf, NULL, FTW_DCHP,
&data->ftw);
}
}
}
}
@@ -464,6 +470,10 @@ ftw_dir (struct ftw_data *data, struct STAT *st)
data->actdir = data->maxdir - 1;
data->dirstreams[data->actdir] = NULL;
/* We cannot change to the directory.
Signal this with a special flag. */
result = (*data->func) (data->dirbuf, st, FTW_DCH, &data->ftw);
return result;
}
}