empathy r1765 - trunk/libempathy-gtk



Author: xclaesse
Date: Fri Nov 21 16:15:35 2008
New Revision: 1765
URL: http://svn.gnome.org/viewvc/empathy?rev=1765&view=rev

Log:
Show an error to the terminal when there's a problem in getting the output stream. (Jonny Lamb)

Signed-off-by: Jonny Lamb <jonny lamb collabora co uk>

Modified:
   trunk/libempathy-gtk/empathy-ft-manager.c

Modified: trunk/libempathy-gtk/empathy-ft-manager.c
==============================================================================
--- trunk/libempathy-gtk/empathy-ft-manager.c	(original)
+++ trunk/libempathy-gtk/empathy-ft-manager.c	Fri Nov 21 16:15:35 2008
@@ -1033,11 +1033,20 @@
 			GFile         *file;
 			GOutputStream *out_stream;
 			gchar         *filename;
+			GError        *error = NULL;
 
 			file = g_file_new_for_uri (uri);
 			out_stream = G_OUTPUT_STREAM (g_file_replace (file, NULL,
 								      FALSE, 0,
-								      NULL, NULL));
+								      NULL, &error));
+
+			if (error) {
+				g_warning ("Error with opening file to write to: %s",
+					error->message ? error->message : "no error");
+				g_error_free (error);
+				return;
+			}
+
 			empathy_file_set_output_stream (response_data->file, out_stream);
 
 			g_object_set_data_full (G_OBJECT (response_data->file),



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