From c345604989402eab7e4c72bcf9e249792c0810bb Mon Sep 17 00:00:00 2001 From: Srinivasa Ragavan Date: Thu, 25 May 2006 06:06:16 +0000 Subject: Added support for saving/attaching files/events/mails from/to remote shares svn path=/trunk/; revision=32024 --- widgets/misc/e-attachment.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'widgets/misc/e-attachment.c') diff --git a/widgets/misc/e-attachment.c b/widgets/misc/e-attachment.c index 9bec31ca2e..7dae3d8e21 100644 --- a/widgets/misc/e-attachment.c +++ b/widgets/misc/e-attachment.c @@ -395,10 +395,12 @@ e_attachment_new_remote_file (const char *url, EAttachment *new; DownloadInfo *download_info; gchar *base; - + CamelURL *curl; + g_return_val_if_fail (url != NULL, NULL); - base = g_path_get_basename (url); + curl = camel_url_new (url, NULL); + base = g_path_get_basename (curl->path); new = g_object_new (E_TYPE_ATTACHMENT, NULL); new->editor_gui = NULL; @@ -417,6 +419,7 @@ e_attachment_new_remote_file (const char *url, download_info->file_name = g_strdup (new->file_name); download_to_local_path (gnome_vfs_uri_new(url), gnome_vfs_uri_new(new->file_name), download_info); + camel_url_free (curl); return new; } @@ -440,6 +443,7 @@ e_attachment_build_remote_file (const char *file_name, camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM, _("Cannot attach file %s: %s"), file_name, g_strerror (errno)); + g_message ("Cannot attach file %s: %s\n", file_name, g_strerror (errno)); return; } @@ -448,6 +452,7 @@ e_attachment_build_remote_file (const char *file_name, camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM, _("Cannot attach file %s: not a regular file"), file_name); + g_message ("Cannot attach file %s: not a regular file", file_name); return; } -- cgit v1.2.3