summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorJean-Francois Brousseau <jfb@cvs.openbsd.org>2005-01-24 16:41:29 +0000
committerJean-Francois Brousseau <jfb@cvs.openbsd.org>2005-01-24 16:41:29 +0000
commit9f382d3d6d34d4bca87a9728f97fc581846d82bc (patch)
tree59e3b4fe40cdf01cfc4f07a192d0d37e418cfa54 /usr.bin
parente9cd46e7781cf841688418f674e096021931204f (diff)
when loading a file's information, remove its entry from the parent
directory's entries handle even if the file doesn't exist on disk
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/cvs/file.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/cvs/file.c b/usr.bin/cvs/file.c
index bd45a0aff75..356c7d6d6ea 100644
--- a/usr.bin/cvs/file.c
+++ b/usr.bin/cvs/file.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: file.c,v 1.51 2005/01/12 20:10:09 jfb Exp $ */
+/* $OpenBSD: file.c,v 1.52 2005/01/24 16:41:28 jfb Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -910,9 +910,6 @@ cvs_file_lget(const char *path, int flags, CVSFILE *parent)
else
cfp->cf_cvstat = CVS_FST_MODIFIED;
}
-
- cvs_ent_remove(CVS_DIR_ENTRIES(parent),
- CVS_FILE_NAME(cfp));
}
} else {
if (ent == NULL) {
@@ -924,6 +921,9 @@ cvs_file_lget(const char *path, int flags, CVSFILE *parent)
cfp->cf_cvstat = CVS_FST_LOST;
}
+ if (ent != NULL)
+ cvs_ent_remove(CVS_DIR_ENTRIES(parent), CVS_FILE_NAME(cfp));
+
if ((cfp->cf_type == DT_DIR) && (cvs_file_getdir(cfp, flags) < 0)) {
cvs_file_free(cfp);
return (NULL);