Mayeu <[email protected]> writes:

> On Fri, 24 Apr 2015 07:25:28 +0900
> David Bremner <[email protected]> wrote:
>> OK. Please try running "notmuch new" (the second time) with --debug.
>
> The output is exactly the same, no other information. I also tried to
> add --verbose but same output. Both are accepted as valid since I do
> net get back any error, but the output is not changed.
>

I think there is just not enough debugging output in this part of the
code. If you can compile from source, please try the attached patch
(it's against master, but I guess it should apply to 0.19 as well).

>From 52975ecfdc754863e9ac9b465257a566845377c3 Mon Sep 17 00:00:00 2001
From: David Bremner <[email protected]>
Date: Mon, 27 Apr 2015 08:42:36 +0900
Subject: [PATCH] cli/new: add more debugging output

Try to narrow down what part of the code adds files and directories to
the queue(s) to be deleted.
---
 notmuch-new.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/notmuch-new.c b/notmuch-new.c
index e6c283e..39b0b9a 100644
--- a/notmuch-new.c
+++ b/notmuch-new.c
@@ -528,6 +528,10 @@ add_files (notmuch_database_t *notmuch,
 					      "%s/%s", path,
 					      notmuch_filenames_get (db_files));
 
+	    if (state->debug)
+		printf ("(D) add_files_recursive, pass 2: queuing passed file %s for deletion\n",
+			absolute);
+
 	    _filename_list_add (state->removed_files, absolute);
 
 	    notmuch_filenames_move_to_next (db_files);
@@ -542,6 +546,9 @@ add_files (notmuch_database_t *notmuch,
 	    {
 		char *absolute = talloc_asprintf (state->removed_directories,
 						  "%s/%s", path, filename);
+		if (state->debug)
+		    printf ("(D) add_files_recursive, pass 2: queuing passed directory %s for deletion\n",
+			absolute);
 
 		_filename_list_add (state->removed_directories, absolute);
 	    }
@@ -610,6 +617,9 @@ add_files (notmuch_database_t *notmuch,
 	char *absolute = talloc_asprintf (state->removed_files,
 					  "%s/%s", path,
 					  notmuch_filenames_get (db_files));
+	if (state->debug)
+	    printf ("(D) add_files_recursive, pass 3: queuing leftover file %s for deletion\n",
+		    absolute);
 
 	_filename_list_add (state->removed_files, absolute);
 
@@ -622,6 +632,10 @@ add_files (notmuch_database_t *notmuch,
 					  "%s/%s", path,
 					  notmuch_filenames_get (db_subdirs));
 
+	if (state->debug)
+	    printf ("(D) add_files_recursive, pass 3: queuing leftover directory %s for deletion\n",
+		    absolute);
+
 	_filename_list_add (state->removed_directories, absolute);
 
 	notmuch_filenames_move_to_next (db_subdirs);
-- 
2.1.4

_______________________________________________
notmuch mailing list
[email protected]
http://notmuchmail.org/mailman/listinfo/notmuch

Reply via email to