From: <dg...@su...> - 2009-01-10 22:09:03
|
Author: dgollub Date: Sat Jan 10 23:08:29 2009 New Revision: 5078 URL: http://www.opensync.org/changeset/5078 Log: Use G_DIR_SEPERATOR to build a path in write/commit function. Fix compiler warning about wrong return value. Modified: plugins/file-sync/src/file_sync.c Modified: plugins/file-sync/src/file_sync.c ============================================================================== --- plugins/file-sync/src/file_sync.c Sat Jan 10 23:06:42 2009 (r5077) +++ plugins/file-sync/src/file_sync.c Sat Jan 10 23:08:29 2009 (r5078) @@ -178,13 +178,12 @@ unsigned int size = 0; char *filename = NULL, *tmp = NULL; - if (!(tmp = strdup(osync_change_get_uid(change)))) { - osync_trace(TRACE_EXIT_ERROR, "%s", __func__); - return; - } + if (!(tmp = strdup(osync_change_get_uid(change)))) + goto error; + filename_scape_characters(tmp); - filename = g_strdup_printf ("%s/%s", dir->path, tmp); + filename = g_strdup_printf ("%s%c%s", dir->path, G_DIR_SEPARATOR, tmp); free(tmp); switch (osync_change_get_changetype(change)) { |