=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cvs/buf.c,v retrieving revision 1.48 retrieving revision 1.49 diff -c -r1.48 -r1.49 *** src/usr.bin/cvs/buf.c 2006/04/13 19:11:30 1.48 --- src/usr.bin/cvs/buf.c 2006/04/14 02:45:35 1.49 *************** *** 1,4 **** ! /* $OpenBSD: buf.c,v 1.48 2006/04/13 19:11:30 joris Exp $ */ /* * Copyright (c) 2003 Jean-Francois Brousseau * All rights reserved. --- 1,4 ---- ! /* $OpenBSD: buf.c,v 1.49 2006/04/14 02:45:35 deraadt Exp $ */ /* * Copyright (c) 2003 Jean-Francois Brousseau * All rights reserved. *************** *** 344,350 **** int fd; open: if ((fd = open(path, O_WRONLY|O_CREAT|O_TRUNC, mode)) == -1) { ! if ((errno == EACCES) && (unlink(path) != -1)) goto open; else fatal("open: `%s': %s", path, strerror(errno)); --- 344,350 ---- int fd; open: if ((fd = open(path, O_WRONLY|O_CREAT|O_TRUNC, mode)) == -1) { ! if (errno == EACCES && unlink(path) != -1) goto open; else fatal("open: `%s': %s", path, strerror(errno));