diff options
author | Jean-Francois Brousseau <jfb@cvs.openbsd.org> | 2005-01-11 00:01:15 +0000 |
---|---|---|
committer | Jean-Francois Brousseau <jfb@cvs.openbsd.org> | 2005-01-11 00:01:15 +0000 |
commit | 44101ba4b541339e5661d2ae9b8cffddc7defa82 (patch) | |
tree | 8c85963e01d645d6c6fe1463af4465227c49c701 /usr.bin | |
parent | ca6f4dedf7deebc0146f43142008b43fa50903a4 (diff) |
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')
-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) { |