Mercurial > geeqie
comparison src/ui_tabcomp.c @ 1370:0011d6859ec5
Add a directory separator at the end of names in tab completion list to indicate directories.
author | zas_ |
---|---|
date | Mon, 02 Mar 2009 21:04:38 +0000 |
parents | 249bf204004a |
children | 2c2f86e30f6c |
comparison
equal
deleted
inserted
replaced
1369:dc1768a8af01 | 1370:0011d6859ec5 |
---|---|
122 while ((dir = readdir(dp)) != NULL) | 122 while ((dir = readdir(dp)) != NULL) |
123 { | 123 { |
124 gchar *name = dir->d_name; | 124 gchar *name = dir->d_name; |
125 if (strcmp(name, ".") != 0 && strcmp(name, "..") != 0) | 125 if (strcmp(name, ".") != 0 && strcmp(name, "..") != 0) |
126 { | 126 { |
127 list = g_list_prepend(list, path_to_utf8(name)); | 127 gchar *abspath = g_build_filename(path, name, NULL); |
128 | |
129 if (isdir(abspath)) | |
130 { | |
131 gchar *dname = g_strconcat(name, G_DIR_SEPARATOR_S, NULL); | |
132 list = g_list_prepend(list, path_to_utf8(dname)); | |
133 } | |
134 else | |
135 { | |
136 list = g_list_prepend(list, path_to_utf8(name)); | |
137 } | |
138 g_free(abspath); | |
128 } | 139 } |
129 } | 140 } |
130 closedir(dp); | 141 closedir(dp); |
131 | 142 |
132 td->dir_path = g_strdup(path); | 143 td->dir_path = g_strdup(path); |