diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2006-06-07 22:21:00 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2006-06-07 22:21:00 +0000 |
commit | 8c6a339843abdeb078e299963d8a9c4c960fa425 (patch) | |
tree | fd929c5678e17deace8408627b6114ca0150952e /usr.bin/cvs/util.c | |
parent | c7771f7ece188d4c7cf4bc238a56a9fa1e0242ea (diff) |
a bug in cvs_mkpath() prevented to create the CVS admin directory and
files under some special circumstances. remove a bogus stat() check to
fix it.
ok joris@
Diffstat (limited to 'usr.bin/cvs/util.c')
-rw-r--r-- | usr.bin/cvs/util.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/usr.bin/cvs/util.c b/usr.bin/cvs/util.c index 94208cece76..4269f34fdf9 100644 --- a/usr.bin/cvs/util.c +++ b/usr.bin/cvs/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.85 2006/05/30 19:30:11 joris Exp $ */ +/* $OpenBSD: util.c,v 1.86 2006/06/07 22:20:59 reyk Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * Copyright (c) 2005, 2006 Joris Vink <joris@openbsd.org> @@ -673,7 +673,6 @@ cvs_mkpath(const char *path) { FILE *fp; size_t len; - struct stat st; char *sp, *dp, *dir, rpath[MAXPATHLEN], repo[MAXPATHLEN]; dir = xstrdup(path); @@ -718,9 +717,6 @@ cvs_mkpath(const char *path) if (len >= (int)sizeof(rpath)) fatal("cvs_mkpath: overflow"); - if (stat(repo, &st) != -1) - continue; - if (mkdir(rpath, 0755) == -1 && errno != EEXIST) fatal("cvs_mkpath: %s: %s", rpath, strerror(errno)); |