# HG changeset patch # User zas_ # Date 1211328792 0 # Node ID d4a68dfa6819e5138a39016af3fc33f28a565943 # Parent d86748a2650ac150995c07c830e34e153c51e220 Use g_build_filename() and get rid of "root dir fix". diff -r d86748a2650a -r d4a68dfa6819 src/filedata.c --- a/src/filedata.c Wed May 21 00:12:19 2008 +0000 +++ b/src/filedata.c Wed May 21 00:13:12 2008 +0000 @@ -629,19 +629,12 @@ return FALSE; } - /* root dir fix */ - if (pathl[0] == '/' && pathl[1] == '\0') - { - g_free(pathl); - pathl = g_strdup(""); - } - while ((dir = readdir(dp)) != NULL) { gchar *name = dir->d_name; if (options->file_filter.show_hidden_files || !ishidden(name)) { - gchar *filepath = g_strconcat(pathl, "/", name, NULL); + gchar *filepath = g_build_filename(pathl, name, NULL); if ((follow_symlinks ? stat(filepath, &ent_sbuf) : lstat(filepath, &ent_sbuf)) >= 0)