Skip to content

Commit

Permalink
Correct deleted email count
Browse files Browse the repository at this point in the history
  • Loading branch information
smowton committed Apr 11, 2019
1 parent 1ef0575 commit f91d0cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/incredimail_convert.c
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ void Incredimail_2_Maildir_Email_Count(const char *filename, int *email_total, i
sqlite3_stmt *stmt;

const char* allMailQuery = "select count(*) from Headers where Location != \"\"";
const char* notDeletedQuery = "select count(*) from Headers where Location != \"\" and deleted = 0";
const char* deletedQuery = "select count(*) from Headers where Location != \"\" and deleted = 1";

*email_total = 0;
*deleted_emails = 0;
Expand All @@ -561,7 +561,7 @@ void Incredimail_2_Maildir_Email_Count(const char *filename, int *email_total, i
sqlite3_reset(stmt);
sqlite3_finalize(stmt);

if (sqlite3_prepare_v2(db, notDeletedQuery, -1, &stmt, NULL) != SQLITE_OK)
if (sqlite3_prepare_v2(db, deletedQuery, -1, &stmt, NULL) != SQLITE_OK)
goto outdb;

if (sqlite3_step(stmt) != SQLITE_ROW)
Expand Down

0 comments on commit f91d0cc

Please sign in to comment.