From b5060d65ffb649e508235afa8b2f91a9497b8829 Mon Sep 17 00:00:00 2001 From: Joris Vink Date: Fri, 17 Jun 2005 14:58:24 +0000 Subject: when pruning don't try to remove any directories outside the actual repository. reported by david@, ok xsa@ --- usr.bin/cvs/file.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'usr.bin/cvs') diff --git a/usr.bin/cvs/file.c b/usr.bin/cvs/file.c index d12d6eddef0..0b02b972e56 100644 --- a/usr.bin/cvs/file.c +++ b/usr.bin/cvs/file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: file.c,v 1.88 2005/06/14 15:27:31 joris Exp $ */ +/* $OpenBSD: file.c,v 1.89 2005/06/17 14:58:23 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. @@ -1165,6 +1165,7 @@ cvs_file_prune(char *path) struct dirent *dp; char fpath[MAXPATHLEN]; CVSENTRIES *entf; + CVSFILE *cfp; pwd = (!strcmp(path, ".")); @@ -1192,6 +1193,10 @@ cvs_file_prune(char *path) continue; } + cfp = cvs_file_find(cvs_files, fpath); + if (cfp == NULL) + continue; + if (cvs_file_prune(fpath)) { empty--; if (entf) -- cgit v1.2.3