summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoris Vink <joris@cvs.openbsd.org>2005-06-17 14:58:24 +0000
committerJoris Vink <joris@cvs.openbsd.org>2005-06-17 14:58:24 +0000
commitb5060d65ffb649e508235afa8b2f91a9497b8829 (patch)
tree604267785a756469ce05cf86f093ecafd7cf559d
parent98d299fb3163226547d144ab4bf2290abe7bf7c7 (diff)
when pruning don't try to remove any directories outside
the actual repository. reported by david@, ok xsa@
-rw-r--r--usr.bin/cvs/file.c7
1 files changed, 6 insertions, 1 deletions
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 <jfb@openbsd.org>
* 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)