=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cvs/Attic/resp.c,v retrieving revision 1.39 retrieving revision 1.40 diff -c -r1.39 -r1.40 *** src/usr.bin/cvs/Attic/resp.c 2005/05/24 19:13:52 1.39 --- src/usr.bin/cvs/Attic/resp.c 2005/05/24 22:00:25 1.40 *************** *** 1,4 **** ! /* $OpenBSD: resp.c,v 1.39 2005/05/24 19:13:52 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. --- 1,4 ---- ! /* $OpenBSD: resp.c,v 1.40 2005/05/24 22:00:25 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. *************** *** 364,370 **** CVS_PATH_STATICENTRIES); return (-1); } else if (type == CVS_RESP_SETSTATDIR) { ! fd = open(statpath, O_CREAT|O_TRUNC|O_WRONLY, 0400); if (fd == -1) { cvs_log(LP_ERRNO, "failed to set static directory on %s", --- 364,370 ---- CVS_PATH_STATICENTRIES); return (-1); } else if (type == CVS_RESP_SETSTATDIR) { ! fd = open(statpath, O_CREAT|O_TRUNC|O_WRONLY, 0644); if (fd == -1) { cvs_log(LP_ERRNO, "failed to set static directory on %s", *************** *** 430,443 **** /* add a directory entry to the parent */ if ((entf = cvs_ent_open(subdir, O_WRONLY)) != NULL) { ! snprintf(buf, sizeof(buf), "D/%s////", ! CVS_FILE_NAME(cf)); ! ent = cvs_ent_parse(buf); ! if (ent == NULL) ! cvs_log(LP_ERR, ! "failed to create directory entry"); ! else ! cvs_ent_add(entf, ent); cvs_ent_close(entf); } } --- 430,445 ---- /* add a directory entry to the parent */ if ((entf = cvs_ent_open(subdir, O_WRONLY)) != NULL) { ! if ((ent = cvs_ent_get(entf, CVS_FILE_NAME(cf))) == NULL) { ! snprintf(buf, sizeof(buf), "D/%s////", ! CVS_FILE_NAME(cf)); ! ent = cvs_ent_parse(buf); ! if (ent == NULL) ! cvs_log(LP_ERR, ! "failed to create directory entry"); ! else ! cvs_ent_add(entf, ent); ! } cvs_ent_close(entf); } }