From e13ede6f2cdaed90d7178c571a7dfbc37ad5bf09 Mon Sep 17 00:00:00 2001 From: Joris Vink Date: Tue, 24 May 2005 21:57:34 +0000 Subject: don't fail on mkdir(2) when errno is EEXIST in cvs_file_create(). --- usr.bin/cvs/file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.bin') diff --git a/usr.bin/cvs/file.c b/usr.bin/cvs/file.c index f109e3fb599..6aec3167b38 100644 --- a/usr.bin/cvs/file.c +++ b/usr.bin/cvs/file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: file.c,v 1.78 2005/05/24 20:04:43 joris Exp $ */ +/* $OpenBSD: file.c,v 1.79 2005/05/24 21:57:33 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. @@ -269,7 +269,7 @@ cvs_file_create(CVSFILE *parent, const char *path, u_int type, mode_t mode) return (NULL); } - if ((mkdir(path, mode) == -1) || + if (((mkdir(path, mode) == -1) && (errno != EEXIST)) || (cvs_mkadmin(path, cfp->cf_root->cr_str, cfp->cf_repo) < 0)) { cvs_file_free(cfp); return (NULL); -- cgit v1.2.3