summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
authorStefan Walter <stefw@src.gnome.org>2009-02-26 05:40:49 +0000
committerStefan Walter <stefw@src.gnome.org>2009-02-26 05:40:49 +0000
commit4dc84d2031bfee4fe5acc4cee9505ee22432daf9 (patch)
tree150acbfb2cb458ee5ceddffdccaa359a6aebeab6 /tool
parent8f27ccbf9557f7ecb7491d9a1eaf120aaaf9da84 (diff)
downloadgnome-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.c16
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;
+ }
}
}