]> git.0d.be Git - empathy.git/commitdiff
Show an error to the terminal when there's a problem in getting the output stream...
authorJonny Lamb <jonny.lamb@collabora.co.uk>
Fri, 21 Nov 2008 16:15:35 +0000 (16:15 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Fri, 21 Nov 2008 16:15:35 +0000 (16:15 +0000)
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
svn path=/trunk/; revision=1765

libempathy-gtk/empathy-ft-manager.c

index 886a4a1dc0d7a2bc25b2de4c590e255ab54c435a..4eeba68f7554ee1991fd12d7cb1900179404588d 100644 (file)
@@ -1033,11 +1033,20 @@ ft_manager_save_dialog_response_cb (GtkDialog           *widget,
                        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),