aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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),