/* If we get out of the switch above without continue'ing, we've
successfully downloaded a file. Remember this fact. */
- downloaded_file(ADD_FILE, locf);
+ downloaded_file(FILE_DOWNLOADED_NORMALLY, locf);
if (con->st & ON_YOUR_OWN)
{
/* Increase the depth. */
++depth;
- if (opt.reclevel && depth > opt.reclevel)
+ if (opt.reclevel != INFINITE_RECURSION && depth > opt.reclevel)
{
DEBUGP ((_("Recursion depth %d exceeded max. depth %d.\n"),
depth, opt.reclevel));
else if (f->tstamp == -1)
logprintf (LOG_NOTQUIET, _("%s: corrupt time-stamp.\n"), u->local);
- if (f->perms && dlthis)
+ if (f->perms && f->type == FT_PLAINFILE && dlthis)
chmod (u->local, f->perms);
else
DEBUGP (("Unrecognized permissions for %s.\n", u->local));
f = f->next;
} /* while */
/* We do not want to call ftp_retrieve_dirs here */
- if (opt.recursive && !(opt.reclevel && depth >= opt.reclevel))
+ if (opt.recursive &&
+ !(opt.reclevel != INFINITE_RECURSION && depth >= opt.reclevel))
err = ftp_retrieve_dirs (u, orig, con);
else if (opt.recursive)
DEBUGP ((_("Will not retrieve dirs since depth is %d (max %d).\n"),