unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] notmuch-new: Fix notmuch new to look at files within symbolic links
@ 2009-11-25  4:58 Aneesh Kumar K.V
  2009-11-28  1:29 ` Carl Worth
  0 siblings, 1 reply; 2+ messages in thread
From: Aneesh Kumar K.V @ 2009-11-25  4:58 UTC (permalink / raw)
  To: notmuch

We look at the modified time of the database and the directory
to decide whether we need to look at only the subdirectories.
ie, if directory modified time is < database modified time
then we have already looking at all the files withing the
directory. So we just need to iterate through the subdirectories

But with symlinks we need to make sure we follow them even if
the directory modified time is less than database modified time

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
---
 notmuch-new.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/notmuch-new.c b/notmuch-new.c
index e32b92a..ba5bb5a 100644
--- a/notmuch-new.c
+++ b/notmuch-new.c
@@ -149,7 +149,7 @@ add_files_recursive (notmuch_database_t *notmuch,
 	/* If this directory hasn't been modified since the last
 	 * add_files, then we only need to look further for
 	 * sub-directories. */
-	if (path_mtime <= path_dbtime && entry->d_type != DT_DIR)
+	if (path_mtime <= path_dbtime && entry->d_type == DT_REG)
 	    continue;
 
 	/* Ignore special directories to avoid infinite recursion.
-- 
1.6.5.2.74.g610f9

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] notmuch-new: Fix notmuch new to look at files within symbolic links
  2009-11-25  4:58 [PATCH] notmuch-new: Fix notmuch new to look at files within symbolic links Aneesh Kumar K.V
@ 2009-11-28  1:29 ` Carl Worth
  0 siblings, 0 replies; 2+ messages in thread
From: Carl Worth @ 2009-11-28  1:29 UTC (permalink / raw)
  To: Aneesh Kumar K.V, notmuch

On Wed, 25 Nov 2009 10:28:24 +0530, "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> wrote:
> We look at the modified time of the database and the directory
> to decide whether we need to look at only the subdirectories.
> ie, if directory modified time is < database modified time
> then we have already looking at all the files withing the
> directory. So we just need to iterate through the subdirectories
> 
> But with symlinks we need to make sure we follow them even if
> the directory modified time is less than database modified time

Thanks, Aneesh!

I'm sure everyone with symlinks in their mail store is really going to
appreciate this fix. This is now pushed out.

-Carl

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-11-28  1:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-25  4:58 [PATCH] notmuch-new: Fix notmuch new to look at files within symbolic links Aneesh Kumar K.V
2009-11-28  1:29 ` Carl Worth

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).