summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjoris <joris@openbsd.org>2017-06-01 08:17:27 +0000
committerjoris <joris@openbsd.org>2017-06-01 08:17:27 +0000
commit4f2efe077d2a5733def96514d9773090c017d6c5 (patch)
treefc27f6471c2cccfbcb35d0a634aad6ad17011786
parentStop looking at current_cvsroot->cr_method to figure out if we're remote or not. (diff)
downloadwireguard-openbsd-4f2efe077d2a5733def96514d9773090c017d6c5.tar.xz
wireguard-openbsd-4f2efe077d2a5733def96514d9773090c017d6c5.zip
Don't look at file_type until after cvs_remote_classify_file() was called.
The file status may be unknown until after that call.
-rw-r--r--usr.bin/cvs/client.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/usr.bin/cvs/client.c b/usr.bin/cvs/client.c
index 5254e00e46c..664ba300f69 100644
--- a/usr.bin/cvs/client.c
+++ b/usr.bin/cvs/client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: client.c,v 1.125 2015/11/05 09:48:21 nicm Exp $ */
+/* $OpenBSD: client.c,v 1.126 2017/06/01 08:17:27 joris Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
*
@@ -454,13 +454,10 @@ cvs_client_sendfile(struct cvs_file *cf)
struct tm datetm;
char rev[CVS_REV_BUFSZ], timebuf[CVS_TIME_BUFSZ], sticky[CVS_REV_BUFSZ];
- if (cf->file_type != CVS_FILE)
- return;
-
cvs_client_senddir(cf->file_wd);
cvs_remote_classify_file(cf);
- if (cf->file_type == CVS_DIR)
+ if (cf->file_type != CVS_FILE)
return;
if (cf->file_ent != NULL && cvs_cmdop != CVS_OP_IMPORT) {