Use g_build_filename().
authorLaurent Monin <geeqie@norz.org>
Wed, 21 May 2008 00:42:14 +0000 (00:42 +0000)
committerLaurent Monin <geeqie@norz.org>
Wed, 21 May 2008 00:42:14 +0000 (00:42 +0000)
src/thumb_standard.c
src/ui_pathsel.c

index e4b1b8a..d5fe59b 100644 (file)
@@ -649,7 +649,7 @@ gint thumb_loader_std_start(ThumbLoaderStd *tl, const gchar *path)
        tl->source_size = st.st_size;
        tl->source_mode = st.st_mode;
 
-       if (!thumb_cache) thumb_cache = g_strconcat(homedir(), "/", THUMB_FOLDER_GLOBAL, NULL);
+       if (!thumb_cache) thumb_cache = g_build_filename(homedir(), THUMB_FOLDER_GLOBAL, NULL);
        if (strncmp(tl->source_path, thumb_cache, strlen(thumb_cache)) != 0)
                {
                gchar *pathl;
index 0ac2fe3..2b711e8 100644 (file)
@@ -189,7 +189,7 @@ static void dest_populate(Dest_Data *dd, const gchar *path)
                if (dd->show_hidden || !is_hidden(dir->d_name))
                        {
                        gchar *name = dir->d_name;
-                       gchar *filepath = g_strconcat(pathl, "/", name, NULL);
+                       gchar *filepath = g_build_filename(pathl, name, NULL);
                        if (stat(filepath, &ent_sbuf) >= 0 && S_ISDIR(ent_sbuf.st_mode))
                                {
                                path_list = g_list_prepend(path_list, path_to_utf8(name));