* Sebastian Hammer, Adam Dickmeiss
*
* $Log: extract.c,v $
- * Revision 1.51 1996-03-19 11:08:42 adam
+ * Revision 1.52 1996-04-25 13:27:57 adam
+ * Function recordExtract modified so that files with no keys (possibly empty)
+ * are ignored.
+ *
+ * Revision 1.51 1996/03/19 11:08:42 adam
* Bug fix: Log preamble wasn't always turned off after recordExtract.
*
* Revision 1.50 1996/02/12 18:45:36 adam
logf (LOG_WARN, "Couldn't extract file %s, code %d", fname, r);
return 0;
}
+ if (reckeys.buf_used == 0)
+ {
+ logf (LOG_WARN, "Empty file %s", fname);
+ return 0;
+ }
}
/* perform match if sysno not known and if match criteria is specified */
int fileExtract (SYSNO *sysno, const char *fname,
const struct recordGroup *rGroupP, int deleteFlag)
{
- int i, fd;
+ int r, i, fd;
char gprefix[128];
char ext[128];
char ext_res[128];
}
}
fi = file_read_start (fd);
- recordExtract (sysno, fname, rGroup, deleteFlag, fi, recType, subType);
+ r = recordExtract (sysno, fname, rGroup, deleteFlag, fi, recType, subType);
log_event_start (NULL, NULL);
file_read_stop (fi);
if (fd != -1)
close (fd);
- return 1;
+ return r;
}