notmuch new: Fix progress notification on database upgrade.
authorCarl Worth <cworth@cworth.org>
Fri, 8 Jan 2010 05:24:44 +0000 (21:24 -0800)
committerCarl Worth <cworth@cworth.org>
Fri, 8 Jan 2010 05:24:44 +0000 (21:24 -0800)
This was firing continuously rather than just once per second as
intended.

lib/database.cc

index 6b8c9989ea4f9c75ada9df3ae0591fca1b65c20f..831b4a16926ded207c00920761fe29e08933679a 100644 (file)
@@ -737,8 +737,10 @@ notmuch_database_upgrade (notmuch_database_t *notmuch,
             notmuch_messages_has_more (messages);
             notmuch_messages_advance (messages))
        {
-           if (do_progress_notify)
+           if (do_progress_notify) {
                progress_notify (closure, count, total);
+               do_progress_notify = 0;
+           }
 
            message = notmuch_messages_get (messages);