aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonny Lamb <jonny.lamb@collabora.co.uk>2008-11-22 00:15:35 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-11-22 00:15:35 +0800
commitd2e05177b87b3b38345a3535c2afb54528d0d8a2 (patch)
tree7c10ec2c615bf5686c5c6ccea8cf6f3056d84518
parentc3ae7279ecee96a63c9d4132ee2bd2f5a30ca1da (diff)
downloadgsoc2013-empathy-d2e05177b87b3b38345a3535c2afb54528d0d8a2.tar
gsoc2013-empathy-d2e05177b87b3b38345a3535c2afb54528d0d8a2.tar.gz
gsoc2013-empathy-d2e05177b87b3b38345a3535c2afb54528d0d8a2.tar.bz2
gsoc2013-empathy-d2e05177b87b3b38345a3535c2afb54528d0d8a2.tar.lz
gsoc2013-empathy-d2e05177b87b3b38345a3535c2afb54528d0d8a2.tar.xz
gsoc2013-empathy-d2e05177b87b3b38345a3535c2afb54528d0d8a2.tar.zst
gsoc2013-empathy-d2e05177b87b3b38345a3535c2afb54528d0d8a2.zip
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> svn path=/trunk/; revision=1765
-rw-r--r--libempathy-gtk/empathy-ft-manager.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/libempathy-gtk/empathy-ft-manager.c b/libempathy-gtk/empathy-ft-manager.c
index 886a4a1dc..4eeba68f7 100644
--- a/libempathy-gtk/empathy-ft-manager.c
+++ b/libempathy-gtk/empathy-ft-manager.c
@@ -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),