minor fix for reindex

This commit is contained in:
SJ 2012-06-01 14:54:13 +02:00
parent 907ce7653b
commit 57adc425b8
2 changed files with 3 additions and 4 deletions

View File

@ -88,7 +88,7 @@ install-piler:
$(INSTALL) -m 6755 -o $(RUNNING_USER) -g $(RUNNING_GROUP) reindex $(DESTDIR)$(bindir) $(INSTALL) -m 6755 -o $(RUNNING_USER) -g $(RUNNING_GROUP) reindex $(DESTDIR)$(bindir)
clean: clean:
rm -f *.o *.a libpiler.so* piler pilerconf pilerget pilerimport pilerexport pilerpurge pilertest rm -f *.o *.a libpiler.so* piler pilerconf pilerget pilerimport pilerexport pilerpurge pilertest reindex
distclean: clean distclean: clean
rm -f Makefile rm -f Makefile

View File

@ -52,7 +52,7 @@ uint64 retrieve_email_by_metadata_id(struct session_data *sdata, uint64 from_id,
struct _state state; struct _state state;
snprintf(s, sizeof(s)-1, "SELECT `id`, `piler_id`, `arrived`, `sent` FROM %s WHERE id BETWEEN %llu AND %llu", SQL_METADATA_TABLE, from_id, to_id); snprintf(s, sizeof(s)-1, "SELECT `id`, `piler_id`, `arrived`, `sent` FROM %s WHERE (id BETWEEN %llu AND %llu) AND `deleted`=0", SQL_METADATA_TABLE, from_id, to_id);
rc = mysql_real_query(&(sdata->mysql), s, strlen(s)); rc = mysql_real_query(&(sdata->mysql), s, strlen(s));
@ -93,8 +93,7 @@ uint64 retrieve_email_by_metadata_id(struct session_data *sdata, uint64 from_id,
unlink(filename); unlink(filename);
if(progressbar && reindexed % 10 == 0) printf("."); if(progressbar && reindexed % 100 == 0) printf(".");
} }
else printf("cannot open: %s\n", filename); else printf("cannot open: %s\n", filename);