]> git.notmuchmail.org Git - notmuch/blobdiff - contrib/notmuch-deliver/src/main.c
More debug messages
[notmuch] / contrib / notmuch-deliver / src / main.c
index 1fece76fe49c64d26decb228be5ec362368e7e9c..49919ff10591631f4a06f7c808fe5f2fe035d0da 100644 (file)
@@ -261,6 +261,7 @@ save_database(notmuch_database_t *db, const char *path, char **default_tags)
        case NOTMUCH_STATUS_SUCCESS:
                break;
        case NOTMUCH_STATUS_DUPLICATE_MESSAGE_ID:
+               g_debug("Message is a duplicate, not adding tags");
                return 0;
        default:
                g_warning("Failed to add `%s' to notmuch database: %s",
@@ -292,8 +293,8 @@ main(int argc, char **argv)
        g_option_context_set_description(ctx,
                "\nConfiguration:\n"
                "  "PACKAGE" uses notmuch's configuration file to determine database path and\n"
-               "initial tags to add to new messages. You may set NOTMUCH_CONFIG environment\n"
-               "variable to specify an alternative configuration file.\n"
+               "  initial tags to add to new messages. You may set NOTMUCH_CONFIG environment\n"
+               "  variable to specify an alternative configuration file.\n"
                "\nExit codes:\n"
                "  0   => Successful run\n"
                "  64  => Usage error\n"
@@ -303,7 +304,7 @@ main(int argc, char **argv)
                "         (failed to read from standard input)\n"
                "         (failed to write to temporary file)\n"
                "  76  => Failed to open/create maildir\n"
-               "  78  => Configuration error (wrt .notmuch-config\n");
+               "  78  => Configuration error (wrt .notmuch-config)\n");
 
        g_log_set_default_handler(log_handler, NULL);
 
@@ -364,6 +365,7 @@ main(int argc, char **argv)
        g_free(maildir);
 
        if ((ret = save_database(db, mail, conf_tags)) != 0 && opt_fatal) {
+               g_warning("Unlinking `%s'", mail);
                unlink(mail);
                return ret;
        }