=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/rdist/client.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- src/usr.bin/rdist/client.c 1996/02/03 12:12:11 1.1 +++ src/usr.bin/rdist/client.c 1996/03/05 03:15:57 1.2 @@ -33,7 +33,7 @@ #ifndef lint static char RCSid[] = -"$Id: client.c,v 1.1 1996/02/03 12:12:11 dm Exp $"; +"$Id: client.c,v 1.2 1996/03/05 03:15:57 dm Exp $"; static char sccsid[] = "@(#)client.c"; @@ -566,6 +566,17 @@ int didupdate = 0; /* + * Don't descend into directory + */ + if (IS_ON(opts, DO_NODESCEND)) + return(0); + + if ((d = opendir(target)) == NULL) { + error("%s: opendir failed: %s", target, SYSERR); + return(-1); + } + + /* * Send recvdir command in recvit() format. */ (void) sendcmd(C_RECVDIR, "%o %04o 0 0 0 %s %s %s", @@ -573,21 +584,10 @@ if (response() < 0) return(-1); - /* - * Don't descend into directory - */ - if (IS_ON(opts, DO_NODESCEND)) - return(0); - if (IS_ON(opts, DO_REMOVE)) if (rmchk(opts) > 0) ++didupdate; - if ((d = opendir(target)) == NULL) { - error("%s: opendir failed: %s", target, SYSERR); - return(-1); - } - optarget = ptarget; len = ptarget - target; while (dp = readdir(d)) {