aboutsummaryrefslogtreecommitdiffhomepage
path: root/notmuch-new.c
diff options
context:
space:
mode:
authorGravatar Carl Worth <cworth@cworth.org>2009-11-21 21:21:58 +0100
committerGravatar Carl Worth <cworth@cworth.org>2009-11-21 21:21:58 +0100
commit5939490f64ec08e931e263d1dfe5b33c3f442d26 (patch)
tree4cf4416929d7555c2337c37e9090605c9724e9b0 /notmuch-new.c
parentb0883709200e707f3250da9bd97514a0fc3b80c8 (diff)
Revert "notmuch: Add Maildir directory name as tag name for messages"
This reverts commit 9794f19017e028b542ed715bef3fd7cf0da5edff. The feature makes a lot of sense for the initial import, but it's not as clear whether it makes sense for ongoing "notmuch new" runs. We might need to make this opt-in by configuration.
Diffstat (limited to 'notmuch-new.c')
-rw-r--r--notmuch-new.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/notmuch-new.c b/notmuch-new.c
index 6264628a..1b055848 100644
--- a/notmuch-new.c
+++ b/notmuch-new.c
@@ -101,7 +101,6 @@ static int ino_cmp(const struct dirent **a, const struct dirent **b)
static notmuch_status_t
add_files_recursive (notmuch_database_t *notmuch,
const char *path,
- const char *tag,
struct stat *st,
add_files_state_t *state)
{
@@ -184,7 +183,6 @@ add_files_recursive (notmuch_database_t *notmuch,
case NOTMUCH_STATUS_SUCCESS:
state->added_messages++;
tag_inbox_and_unread (message);
- notmuch_message_add_tag (message, tag);
break;
/* Non-fatal issues (go on to next file) */
case NOTMUCH_STATUS_DUPLICATE_MESSAGE_ID:
@@ -222,13 +220,7 @@ add_files_recursive (notmuch_database_t *notmuch,
}
}
} else if (S_ISDIR (st->st_mode)) {
- if ((strcmp (entry->d_name, "cur") == 0) ||
- (strcmp (entry->d_name, "new") == 0) ||
- (strcmp (entry->d_name, "tmp") == 0)) {
- status = add_files_recursive (notmuch, next, tag, st, state);
- } else {
- status = add_files_recursive (notmuch, next, entry->d_name, st, state);
- }
+ status = add_files_recursive (notmuch, next, st, state);
if (status && ret == NOTMUCH_STATUS_SUCCESS)
ret = status;
}
@@ -292,7 +284,7 @@ add_files (notmuch_database_t *notmuch,
timerval.it_value.tv_usec = 0;
setitimer (ITIMER_REAL, &timerval, NULL);
- status = add_files_recursive (notmuch, path, basename(path), &st, state);
+ status = add_files_recursive (notmuch, path, &st, state);
/* Now stop the timer. */
timerval.it_interval.tv_sec = 0;