From 49abd46d162e1d5013a42947c200544b75ab9da1 Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Sun, 23 Jan 2011 18:11:38 +0100 Subject: Use g_build_{filename|path} when possible This has a nice side effect of not having double slashes in paths anymore. --- src/items.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/items.c') diff --git a/src/items.c b/src/items.c index 4012980..faedead 100644 --- a/src/items.c +++ b/src/items.c @@ -227,18 +227,18 @@ parse_album_xml (const gchar *filename) /* Retrieve title and description from linked album if not defined here */ if (index->type == GALLERY_TYPE_INDEX && item->title == NULL && item->title_description == NULL) { - s = g_strconcat (base_dir, "/", item->path, "/index.xml", NULL); + s = g_build_filename (base_dir, item->path, "index.xml", NULL); get_album_titles (s, &item->title, &item->title_description, NULL); g_free (s); } /* Retrieve thumbnail from linked album if not defined here */ if (index->type == GALLERY_TYPE_INDEX && item->thumbnail == NULL) { - s = g_strconcat (base_dir, "/", item->path, "/index.xml", NULL); + s = g_build_filename (base_dir, item->path, "index.xml", NULL); s2 = NULL; get_album_titles (s, NULL, NULL, &s2); if (s2) { - item->thumbnail = g_strconcat (item->path, "/", s2, NULL); + item->thumbnail = g_build_filename (item->path, s2, NULL); g_free (s2); } g_free (s); -- cgit v1.2.3