comparison src/view_dir_list.c @ 724:9973edfd86f6

Use g_build_filename() and G_DIR_SEPARATOR_S.
author zas_
date Wed, 21 May 2008 10:52:38 +0000
parents 905688aa2317
children 44128da39e13
comparison
equal deleted inserted replaced
723:7638e83fed2a 724:9973edfd86f6
225 225
226 VDLIST_INFO(vd, list) = filelist_sort(VDLIST_INFO(vd, list), SORT_NAME, TRUE); 226 VDLIST_INFO(vd, list) = filelist_sort(VDLIST_INFO(vd, list), SORT_NAME, TRUE);
227 227
228 /* add . and .. */ 228 /* add . and .. */
229 229
230 if (strcmp(vd->path, "/") != 0) 230 if (strcmp(vd->path, G_DIR_SEPARATOR_S) != 0)
231 { 231 {
232 filepath = g_strconcat(vd->path, "/", "..", NULL); 232 filepath = g_build_filename(vd->path, "..", NULL);
233 fd = file_data_new_simple(filepath); 233 fd = file_data_new_simple(filepath);
234 VDLIST_INFO(vd, list) = g_list_prepend(VDLIST_INFO(vd, list), fd); 234 VDLIST_INFO(vd, list) = g_list_prepend(VDLIST_INFO(vd, list), fd);
235 g_free(filepath); 235 g_free(filepath);
236 } 236 }
237 237
238 if (options->file_filter.show_dot_directory) 238 if (options->file_filter.show_dot_directory)
239 { 239 {
240 filepath = g_strconcat(vd->path, "/", ".", NULL); 240 filepath = g_build_filename(vd->path, ".", NULL);
241 fd = file_data_new_simple(filepath); 241 fd = file_data_new_simple(filepath);
242 VDLIST_INFO(vd, list) = g_list_prepend(VDLIST_INFO(vd, list), fd); 242 VDLIST_INFO(vd, list) = g_list_prepend(VDLIST_INFO(vd, list), fd);
243 g_free(filepath); 243 g_free(filepath);
244 } 244 }
245 245