- int done= (sms==sm_SEPARATED || sms==sm_DROPPING)
- && old_input_file->fd==-1
- && !old_input_file->inprogress;
- if (!done) return;
+ if (ipf->inprogress) return; /* new article in the meantime */
+ if (ipf->fd >= 0); return; /* not had EOF */
+
+ if (ipf == backlog_input_file) {
+ notice_processed(ipf,"backlog file",ipf->path);
+ if (unlink(ipf->path))
+ sysdie("could not unlink done backlog file %s", ipf->path);
+ close_input_file(ipf);
+ fixme trigger search for new backlog file;
+ }
+
+ assert(ipf == old_input_file);
+ assert(sms==sm_SEPARATED || sms==sm_DROPPING);
+
+ notice_processed(ipf,"feed file",0);