lib: Delete stale timestamp documents during database upgrade.
authorCarl Worth <cworth@cworth.org>
Fri, 8 Jan 2010 17:52:25 +0000 (09:52 -0800)
committerCarl Worth <cworth@cworth.org>
Fri, 8 Jan 2010 17:57:09 +0000 (09:57 -0800)
Once we move the timestamp to the new directory document, we don't
need the old one anymore.

lib/database.cc

index 831b4a16926ded207c00920761fe29e08933679a..d0262722cff27dce3086236ea7482e7ffaf968de 100644 (file)
@@ -783,6 +783,8 @@ notmuch_database_upgrade (notmuch_database_t *notmuch,
                                                            term.c_str() + 10);
                notmuch_directory_set_mtime (directory, mtime);
                notmuch_directory_destroy (directory);
+
+               db->delete_document (*p);
            }
        }
     }