]> git.notmuchmail.org Git - notmuch/commit
notmuch new: Remove an unnecessary stat of every regular file in the mail store.
authorCarl Worth <cworth@cworth.org>
Wed, 6 Jan 2010 00:06:46 +0000 (16:06 -0800)
committerCarl Worth <cworth@cworth.org>
Wed, 6 Jan 2010 18:32:06 +0000 (10:32 -0800)
commit2c4555f1a56602ff1dd55a63699810522ba4d91e
treeeb42fcecf5d6d38faf778fa57850beb22ba86293
parentdde214c768a948222786b4c2b5ec404a4ffacc8c
notmuch new: Remove an unnecessary stat of every regular file in the mail store.

We were previousl using the stat for two reasons. One was to obtain
the mtime of the file. This usage was removed in the previous commit,
(since the mtime is unreliable in the case of a file being moved into
the mail store).

The second reason was to identify regular and directory file
types. But this information is already available in the result we get
from scandir.

What's left is simply a stat for each directory in the mailstore,
(which we are still using to compare filesystem mtime with the mtime
stored in the database).
notmuch-new.c