diff options
author | 2005-01-11 00:01:14 +0000 | |
---|---|---|
committer | 2005-01-11 00:01:14 +0000 | |
commit | b80bc4eaa8b4ab1599b959f8629cae8810df79a5 (patch) | |
tree | 9c16d0915e6506e3dd41e01b1926baf18a42d045 /usr.bin/cvs | |
parent | Make sure bogus values don't make their way into tcp_xmit_timer() calculations. (diff) | |
download | wireguard-openbsd-b80bc4eaa8b4ab1599b959f8629cae8810df79a5.tar.xz wireguard-openbsd-b80bc4eaa8b4ab1599b959f8629cae8810df79a5.zip |
Close the Entries file we just created upon directory creation. This
fixes the problem where a checkout would only add entries for
directories.
from Joris Vink
Diffstat (limited to 'usr.bin/cvs')
-rw-r--r-- | usr.bin/cvs/file.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/cvs/file.c b/usr.bin/cvs/file.c index e4ef5a13ffd..788ede4afe9 100644 --- a/usr.bin/cvs/file.c +++ b/usr.bin/cvs/file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: file.c,v 1.49 2005/01/06 20:17:25 jfb Exp $ */ +/* $OpenBSD: file.c,v 1.50 2005/01/11 00:01:14 jfb Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -284,6 +284,10 @@ cvs_file_create(CVSFILE *parent, const char *path, u_int type, mode_t mode) } cfp->cf_ddat->cd_ent = cvs_ent_open(path, O_RDWR); + if (cfp->cf_ddat->cd_ent != NULL) { + cvs_ent_close(cfp->cf_ddat->cd_ent); + cfp->cf_ddat->cd_ent = NULL; + } } else { fd = open(path, O_WRONLY|O_CREAT|O_EXCL, mode); if (fd == -1) { |