gnome-keyring r1620 - in trunk: . tool



Author: nnielsen
Date: Thu Feb 26 05:40:49 2009
New Revision: 1620
URL: http://svn.gnome.org/viewvc/gnome-keyring?rev=1620&view=rev

Log:
Exit when an error occurs on import.

Modified:
   trunk/ChangeLog
   trunk/tool/gkr-tool-import.c

Modified: trunk/tool/gkr-tool-import.c
==============================================================================
--- trunk/tool/gkr-tool-import.c	(original)
+++ trunk/tool/gkr-tool-import.c	Thu Feb 26 05:40:49 2009
@@ -128,14 +128,14 @@
 		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;
+			}
 		}
 	}
 	



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]