Compare commits
2 Commits
8678f326cd
...
017e6e8b9a
Author | SHA1 | Date | |
---|---|---|---|
017e6e8b9a | |||
a3173fa1d8 |
@ -375,7 +375,7 @@ static void mdiary_add_file_to_store(struct mdiary_scanner *mdiary_scanner,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void mdiary_add_gpg_to_store(struct mdiary_scanner *mdiary_scanner,
|
static void mdiary_add_gpg_to_store(struct mdiary_scanner *mdiary_scanner,
|
||||||
gchar *filename, GList **add_tags,
|
gchar *filename, GList **autotags,
|
||||||
GtkListStore *entryListStore, GtkListStore *autoCompletion)
|
GtkListStore *entryListStore, GtkListStore *autoCompletion)
|
||||||
{
|
{
|
||||||
gchar *cmd = NULL;
|
gchar *cmd = NULL;
|
||||||
@ -387,7 +387,9 @@ static void mdiary_add_gpg_to_store(struct mdiary_scanner *mdiary_scanner,
|
|||||||
|
|
||||||
if (g_spawn_command_line_sync(cmd, &cmd_stdout, &cmd_stderr, &exit_status, NULL) && exit_status == 0) {
|
if (g_spawn_command_line_sync(cmd, &cmd_stdout, &cmd_stderr, &exit_status, NULL) && exit_status == 0) {
|
||||||
g_message("GPG: Decryption OK!\n");
|
g_message("GPG: Decryption OK!\n");
|
||||||
mdiary_add_file_to_store(mdiary_scanner, filename, cmd_stdout, *add_tags, entryListStore, autoCompletion);
|
*autotags = g_list_append(*autotags, "encrypted");
|
||||||
|
mdiary_add_file_to_store(mdiary_scanner, filename, cmd_stdout, *autotags, entryListStore, autoCompletion);
|
||||||
|
*autotags = g_list_remove(*autotags, g_list_last(*autotags)->data);
|
||||||
} else {
|
} else {
|
||||||
mdiary_scanner->entries_failed++;
|
mdiary_scanner->entries_failed++;
|
||||||
mdiary_scanner->error_code |= MDS_ERROR_GPG;
|
mdiary_scanner->error_code |= MDS_ERROR_GPG;
|
||||||
|
Loading…
Reference in New Issue
Block a user