diff --git a/libbalsa/autocrypt.c b/libbalsa/autocrypt.c index 7c4be82c3..cfcb6aae5 100644 --- a/libbalsa/autocrypt.c +++ b/libbalsa/autocrypt.c @@ -24,6 +24,7 @@ #if defined ENABLE_AUTOCRYPT +#include #include #include #include @@ -142,6 +143,9 @@ autocrypt_init(GError **error) gboolean require_init; int sqlite_res; + /* ensure that the config folder exists, otherwise Balsa will throw an error on first use */ + libbalsa_assure_balsa_dir(); + db_path = g_build_filename(g_get_home_dir(), ".balsa", "autocrypt.db", NULL); require_init = (g_access(db_path, R_OK + W_OK) != 0); sqlite_res = sqlite3_open(db_path, &autocrypt_db); @@ -828,7 +832,7 @@ add_or_update_user_info(const AutocryptData *user_info, time_t date_header, gboo g_set_error(error, AUTOCRYPT_ERROR_QUARK, -1, _("%s user ā€œ%sā€ failed: %s"), update ? _("update") : _("insert"), user_info->addr, sqlite3_errmsg(autocrypt_db)); } else { - g_debug("%s user '%s'", update ? "updated" : "inserted", user_info->addr); + g_debug("%s user '%s': %d", update ? "updated" : "inserted", user_info->addr, sqlite3_changes(autocrypt_db)); } sqlite3_reset(query[query_idx]); } @@ -842,7 +846,7 @@ update_last_seen(const gchar *addr, time_t date_header, GError **error) (sqlite3_step(query[3]) != SQLITE_DONE)) { g_set_error(error, AUTOCRYPT_ERROR_QUARK, -1, _("update user ā€œ%sā€ failed: %s"), addr, sqlite3_errmsg(autocrypt_db)); } else { - g_debug("updated last_seen for '%s'", addr); + g_debug("updated last_seen for '%s': %d", addr, sqlite3_changes(autocrypt_db)); } sqlite3_reset(query[3]); } diff --git a/po/POTFILES.in b/po/POTFILES.in index c5ed9c68a..633e20790 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -12,6 +12,7 @@ libbalsa/address-book-osmo.c libbalsa/address-book-vcard.c libbalsa/address.c libbalsa/address-view.c +libbalsa/autocrypt.c libbalsa/body.c libbalsa/filter.c libbalsa/filter-error.c