Add maxdepth to recurse()
This also makes more sense.
This commit is contained in:
@@ -14,7 +14,7 @@ int rm_status = 0;
|
||||
void
|
||||
rm(const char *path, struct stat *st, void *data, struct recursor *r)
|
||||
{
|
||||
if (!(r->flags & NODIRS) && st && S_ISDIR(st->st_mode)) {
|
||||
if (!r->maxdepth && st && S_ISDIR(st->st_mode)) {
|
||||
recurse(path, NULL, r);
|
||||
|
||||
if (rmdir(path) < 0) {
|
||||
|
Reference in New Issue
Block a user