aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc/e-attachment.c
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/misc/e-attachment.c')
-rw-r--r--widgets/misc/e-attachment.c9
1 files changed, 7 insertions, 2 deletions
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;
}