=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cvs/file.c,v retrieving revision 1.71 retrieving revision 1.72 diff -u -r1.71 -r1.72 --- src/usr.bin/cvs/file.c 2005/05/12 23:43:49 1.71 +++ src/usr.bin/cvs/file.c 2005/05/20 05:01:34 1.72 @@ -1,4 +1,4 @@ -/* $OpenBSD: file.c,v 1.71 2005/05/12 23:43:49 joris Exp $ */ +/* $OpenBSD: file.c,v 1.72 2005/05/20 05:01:34 jfb Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. @@ -1011,13 +1011,15 @@ if (ent != NULL) { /* steal the RCSNUM */ cfp->cf_lrev = ent->ce_rev; - if (ent->ce_tag != NULL) { + ent->ce_rev = NULL; + + if ((ent->ce_type == CVS_ENT_REG) && + (ent->ce_tag != NULL)) { if ((cfp->cf_tag = cvs_strdup(ent->ce_tag)) == NULL) { cvs_file_free(cfp); return (NULL); } } - ent->ce_rev = NULL; } if ((cfp->cf_type == DT_DIR) && (cvs_load_dirinfo(cfp, flags) < 0)) {