diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | tool/gkr-tool-import.c | 16 |
2 files changed, 12 insertions, 8 deletions
@@ -1,5 +1,9 @@ 2009-02-24 Stef Walter <stef@memberwebs.com> + * tool/gkr-tool-import.c: Exit when an error occurs on import. + +2009-02-24 Stef Walter <stef@memberwebs.com> + * pkcs11/pkcs11i.h: * pkcs11/user-store/gck-user-storage.c: Hash objects when storing them in user-store and validate the hashes when loading them. diff --git a/tool/gkr-tool-import.c b/tool/gkr-tool-import.c index c15d5c10..74bbfabb 100644 --- a/tool/gkr-tool-import.c +++ b/tool/gkr-tool-import.c @@ -128,14 +128,14 @@ gkr_tool_import (int argc, char *argv[]) if (!input) { gkr_tool_handle_error (&error, "couldn't read file: %s", *imp); ret = 1; - } - - res = gcr_importer_import (importer, input, NULL, &error); - g_object_unref (input); - if (res == FALSE) { - if (!error || error->code != GCR_ERROR_CANCELLED) - gkr_tool_handle_error (&error, "couldn't import file: %s", *imp); - ret = 1; + } else { + res = gcr_importer_import (importer, input, NULL, &error); + g_object_unref (input); + if (res == FALSE) { + if (!error || error->code != GCR_ERROR_CANCELLED) + gkr_tool_handle_error (&error, "couldn't import file: %s", *imp); + ret = 1; + } } } |