From 990ca81862b7e3adbfe7d4c150445fb431d4c0cd Mon Sep 17 00:00:00 2001 From: joris Date: Wed, 31 May 2017 16:18:20 +0000 Subject: [PATCH] When unlocking a directory only unlock the given one rather then all repo_locks. --- usr.bin/cvs/repository.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 -- 2.20.1