Mercurial > geeqie.yaz
diff src/filedata.c @ 712:d4a68dfa6819
Use g_build_filename() and get rid of "root dir fix".
author | zas_ |
---|---|
date | Wed, 21 May 2008 00:13:12 +0000 |
parents | fbebf5cf4a55 |
children | eda074e91ddd |
line wrap: on
line diff
--- 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)