From 44101ba4b541339e5661d2ae9b8cffddc7defa82 Mon Sep 17 00:00:00 2001 From: Jean-Francois Brousseau Date: Tue, 11 Jan 2005 00:01:15 +0000 Subject: 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 --- usr.bin/cvs/file.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'usr.bin') 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 * 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) { -- cgit v1.2.3