[Gpa-commits] r757 - trunk/src

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Sat May 27 15:05:38 CEST 2006


Author: marcus
Date: 2006-05-27 15:05:38 +0200 (Sat, 27 May 2006)
New Revision: 757

Modified:
   trunk/src/ChangeLog
   trunk/src/gpabackupop.c
   trunk/src/gpgmetools.c
Log:
2006-05-27  Marcus Brinkmann  <marcus at g10code.de>

	* gpgmetools.c (gpa_backup_key): Close FILE on error.
	* gpabackupop.c (gpa_backup_operation_do_backup): Add an error
	message if creating the backup fails.


Modified: trunk/src/ChangeLog
===================================================================
--- trunk/src/ChangeLog	2006-03-21 19:10:04 UTC (rev 756)
+++ trunk/src/ChangeLog	2006-05-27 13:05:38 UTC (rev 757)
@@ -1,3 +1,9 @@
+2006-05-27  Marcus Brinkmann  <marcus at g10code.de>
+
+	* gpgmetools.c (gpa_backup_key): Close FILE on error.
+	* gpabackupop.c (gpa_backup_operation_do_backup): Add an error
+	message if creating the backup fails.
+
 2006-03-20  Werner Koch  <wk at g10code.com>
 
 	* hidewnd.c (enum_parent_windows): Updated test for newer

Modified: trunk/src/gpabackupop.c
===================================================================
--- trunk/src/gpabackupop.c	2006-03-21 19:10:04 UTC (rev 756)
+++ trunk/src/gpabackupop.c	2006-05-27 13:05:38 UTC (rev 757)
@@ -241,6 +241,12 @@
 	      gpa_options_set_backup_generated (gpa_options_get_instance (),
 						TRUE);
         }
+      else
+	{
+	  gchar *message = g_strdup_printf (_("An error ocurred during the "
+					      "backup operation."));
+	  gpa_window_error (message, GPA_OPERATION (op)->window);
+	}
     }
 }
 

Modified: trunk/src/gpgmetools.c
===================================================================
--- trunk/src/gpgmetools.c	2006-03-21 19:10:04 UTC (rev 756)
+++ trunk/src/gpgmetools.c	2006-05-27 13:05:38 UTC (rev 757)
@@ -459,6 +459,7 @@
   if( !g_spawn_sync (NULL, pub_argv, NULL, 0, NULL, NULL, &pub_key,
 		     &err, &ret_code, NULL))
     {
+      fclose (file);
       return FALSE;
     }
   fputs (pub_key, file);
@@ -468,6 +469,7 @@
   if( !g_spawn_sync (NULL, sec_argv, NULL, 0, NULL, NULL, &sec_key,
 		     &err, &ret_code, NULL))
     {
+      fclose (file);
       return FALSE;
     }
   fputs (sec_key, file);



More information about the Gpa-commits mailing list