[evolution-data-server] Fix attachments retrieval issue in groupwise. Add the prefix file:// to the filename to form the uri
- From: Chenthill Palanisamy <pchen src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Fix attachments retrieval issue in groupwise. Add the prefix file:// to the filename to form the uri
- Date: Tue, 7 Sep 2010 15:05:04 +0000 (UTC)
commit b417129f59c0e6cf26fb22b6abcf71f544f78432
Author: Chenthill Palanisamy <pchenthill novell com>
Date: Tue Sep 7 20:31:36 2010 +0530
Fix attachments retrieval issue in groupwise. Add the prefix file:// to the filename to form the uri
.../groupwise/e-cal-backend-groupwise-utils.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c b/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c
index 54816ca..61f207e 100644
--- a/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c
+++ b/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c
@@ -905,13 +905,21 @@ set_attachments_to_cal_component (EGwItem *item, ECalComponent *comp, ECalBacken
EGwItemAttachment *attach_item;
gchar *attach_data = NULL;
struct stat st;
+ GError *error = NULL;
gchar *filename;
attach_item = (EGwItemAttachment *) l->data;
attach_file_url = g_strconcat (
- cache_dir, "/", uid, "-", attach_item->name, NULL);
+ "file://", cache_dir, "/", uid, "-", attach_item->name, NULL);
+
+ filename = g_filename_from_uri (attach_file_url, NULL, &error);
+
+ if (!filename) {
+ g_message ("Could not get filename %s \n", error->message);
+ g_clear_error (&error);
+ return;
+ }
- filename = g_filename_from_uri (attach_file_url, NULL, NULL);
if (g_stat (filename, &st) == -1) {
if (!get_attach_data_from_server (attach_item, cbgw)) {
g_free (filename);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]