Skip to content

Commit

Permalink
Exclude headers without a location
Browse files Browse the repository at this point in the history
This was noticed in one user's database:  a small number of entries were still in mbox form (no Location specified, but instead an offset in an mbox file is given). Unknown why for now; easiest to just ignore them and convert the messages that are in the expected format.
  • Loading branch information
smowton committed Apr 11, 2019
1 parent a5a2dd1 commit bba948a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Source/incredimail_convert.c
Original file line number Diff line number Diff line change
Expand Up @@ -537,8 +537,8 @@ void Incredimail_2_Maildir_Email_Count(const char *filename, int *email_total, i
sqlite3 *db;
sqlite3_stmt *stmt;

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

*email_total = 0;
*deleted_emails = 0;
Expand Down
2 changes: 1 addition & 1 deletion Source/winmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ enum INCREDIMAIL_VERSIONS incredimail_version;
sqlite3_reset(stmt);
sqlite3_finalize(stmt);

if (sqlite3_prepare_v2(db, "select HeaderID, ContainerID, Location, Deleted from Headers", -1, &stmt, NULL) != SQLITE_OK) {
if (sqlite3_prepare_v2(db, "select HeaderID, ContainerID, Location, Deleted from Headers where Location != \"\"", -1, &stmt, NULL) != SQLITE_OK) {
sqlite3_close(db);
MessageBox(global_hwnd, "Headers query failed", "Error!", MB_OK);
return;
Expand Down

0 comments on commit bba948a

Please sign in to comment.