diff options
author | Stefan Walter <stefw@src.gnome.org> | 2009-02-26 05:40:49 +0000 |
---|---|---|
committer | Stefan Walter <stefw@src.gnome.org> | 2009-02-26 05:40:49 +0000 |
commit | 4dc84d2031bfee4fe5acc4cee9505ee22432daf9 (patch) | |
tree | 150acbfb2cb458ee5ceddffdccaa359a6aebeab6 /tool | |
parent | 8f27ccbf9557f7ecb7491d9a1eaf120aaaf9da84 (diff) | |
download | gnome-keyring-4dc84d2031bfee4fe5acc4cee9505ee22432daf9.tar.gz |
Exit when an error occurs on import.
svn path=/trunk/; revision=1620
Diffstat (limited to 'tool')
-rw-r--r-- | tool/gkr-tool-import.c | 16 |
1 files changed, 8 insertions, 8 deletions
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; + } } } |