From: joris Date: Wed, 31 May 2017 16:18:20 +0000 (+0000) Subject: When unlocking a directory only unlock the given one rather then all repo_locks. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=990ca81862b7e3adbfe7d4c150445fb431d4c0cd;p=openbsd When unlocking a directory only unlock the given one rather then all repo_locks. --- diff --git a/usr.bin/cvs/repository.c b/usr.bin/cvs/repository.c index a5d0fa761ac..6f971e38763 100644 --- a/usr.bin/cvs/repository.c +++ b/usr.bin/cvs/repository.c @@ -1,4 +1,4 @@ -/* $OpenBSD: repository.c,v 1.24 2015/01/16 06:40:07 deraadt Exp $ */ +/* $OpenBSD: repository.c,v 1.25 2017/05/31 16:18:20 joris Exp $ */ /* * Copyright (c) 2006 Joris Vink * @@ -36,8 +36,8 @@ cvs_repository_unlock(const char *repo) (void)xsnprintf(fpath, sizeof(fpath), "%s/%s", repo, CVS_LOCK); - /* XXX - this ok? */ - worklist_run(&repo_locks, worklist_unlink); + if (unlink(fpath) == -1 && errno != ENOENT) + cvs_log(LP_ERR, "warning: failed to unlink %s", fpath); } void