--- ray/src/util/rtcontrib.c 2005/06/11 15:01:03 1.21 +++ ray/src/util/rtcontrib.c 2005/06/16 19:37:26 1.23 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: rtcontrib.c,v 1.21 2005/06/11 15:01:03 greg Exp $"; +static const char RCSid[] = "$Id: rtcontrib.c,v 1.23 2005/06/16 19:37:26 greg Exp $"; #endif /* * Gather rtrace output to compute contributions from particular sources @@ -623,10 +623,8 @@ getofile(const char *ospec, const char *mname, int bn) if (header) { char info[512]; char *cp = info; - if (ofl & OF_MODIFIER) { - sprintf(cp, "MODIFIER=%s\n", mname); - while (*cp) ++cp; - } + sprintf(cp, "MODIFIER=%s\n", mname); + while (*cp) ++cp; if (ofl & OF_BIN) { sprintf(cp, "BIN=%d\n", bn); while (*cp) ++cp; @@ -1032,8 +1030,13 @@ recover_output(FILE *fin) error(USER, "cannot recover from command"); /* open output */ fp = fopen(oname, "rb+"); - if (fp == NULL) - break; /* must be end of modifier */ + if (fp == NULL) { + if (j) + break; /* assume end of modifier */ + sprintf(errmsg, "missing recover file '%s'", + oname); + error(USER, errmsg); + } nvals = lseek(fileno(fp), 0, SEEK_END); if (nvals <= 0) { lastout = 0; /* empty output, quit here */