Add maxdepth to recurse()

This also makes more sense.
This commit is contained in:
FRIGN
2015-04-18 22:04:49 +02:00
committed by sin
parent e14d9412f8
commit 7b2465c101
10 changed files with 54 additions and 45 deletions

3
mv.c
View File

@@ -12,7 +12,8 @@ static int mv_status = 0;
static int
mv(const char *s1, const char *s2, int depth)
{
struct recursor r = { .fn = rm, .hist = NULL, .depth = 0, .follow = 'P', .flags = 0};
struct recursor r = { .fn = rm, .hist = NULL, .depth = 0, .maxdepth = 0,
.follow = 'P', .flags = 0 };
if (!rename(s1, s2))
return (mv_status = 0);