maint: updated maintainer script to support new debian source format
[barry.git] / opensync-plugin / patches / libopensync-plugin-evolution2-0.22-file-path-fudge.patch
blobd2350c954c126f4ecf329d05805029cdda4e7c6a
1 Chris Frey <cdfrey@foursquare.net>
3 This patch checks for the presense of a forward slash at the beginning of
4 each path. If found, it forces the prefix to "file://".
6 This is helpful when running the evolution2 plugin with the KitchenSync
7 GUI (snapshot 2007/07/12), since the GUI seems to strip off the file://
8 prefix no matter what you type into the fields, and the plugin needs
9 the prefix to operate properly.
11 An example of a path:
12 file:///home/cdfrey/.evolution/addressbook/local/system
15 diff -ru libopensync-plugin-evolution2-0.22/src/evolution2_xml.c libopensync-plugin-evolution2-0.22-cdf/src/evolution2_xml.c
16 --- libopensync-plugin-evolution2-0.22/src/evolution2_xml.c 2007-03-27 07:49:55.000000000 -0400
17 +++ libopensync-plugin-evolution2-0.22-cdf/src/evolution2_xml.c 2007-07-27 22:47:43.000000000 -0400
18 @@ -59,13 +59,13 @@
19 char *str = (char*)xmlNodeGetContent(cur);
20 if (str) {
21 if (!xmlStrcmp(cur->name, (const xmlChar *)"address_path")) {
22 - env->addressbook_path = g_strdup(str);
23 + env->addressbook_path = g_strdup_printf("%s%s", (str[0] == '/') ? "file://" : "", str);
25 if (!xmlStrcmp(cur->name, (const xmlChar *)"calendar_path")) {
26 - env->calendar_path = g_strdup(str);
27 + env->calendar_path = g_strdup_printf("%s%s", (str[0] == '/') ? "file://" : "", str);
29 if (!xmlStrcmp(cur->name, (const xmlChar *)"tasks_path")) {
30 - env->tasks_path = g_strdup(str);
31 + env->tasks_path = g_strdup_printf("%s%s", (str[0] == '/') ? "file://" : "", str);
33 xmlFree(str);