Mercurial > geeqie
comparison src/ui_pathsel.c @ 69:31759d770628
Fri Oct 13 10:27:22 2006 John Ellis <johne@verizon.net>
* cache_maint.c, ui_fileops.c, ui_pathsel.c, ui_tabcomp.c: Remove use
of the d_ino > 0 test as all files listed by readdir should be valid.
dirent.d_ino is not guanteed by POSIX, and at one recent point is
not implemented on cygwin.
author | gqview |
---|---|
date | Fri, 13 Oct 2006 14:36:26 +0000 |
parents | 04ff0df3ad2f |
children | 71e1ebee420e |
comparison
equal
deleted
inserted
replaced
68:c6ff22c968b2 | 69:31759d770628 |
---|---|
1 /* | 1 /* |
2 * (SLIK) SimpLIstic sKin functions | 2 * (SLIK) SimpLIstic sKin functions |
3 * (C) 2004 John Ellis | 3 * (C) 2006 John Ellis |
4 * | 4 * |
5 * Author: John Ellis | 5 * Author: John Ellis |
6 * | 6 * |
7 * This software is released under the GNU General Public License (GNU GPL). | 7 * This software is released under the GNU General Public License (GNU GPL). |
8 * Please read the included file COPYING for more information. | 8 * Please read the included file COPYING for more information. |
175 g_free(pathl); | 175 g_free(pathl); |
176 return; | 176 return; |
177 } | 177 } |
178 while ((dir = readdir(dp)) != NULL) | 178 while ((dir = readdir(dp)) != NULL) |
179 { | 179 { |
180 /* skips removed files */ | 180 if (dd->show_hidden || !is_hidden(dir->d_name)) |
181 if (dir->d_ino > 0 && (dd->show_hidden || !is_hidden(dir->d_name)) ) | |
182 { | 181 { |
183 gchar *name = dir->d_name; | 182 gchar *name = dir->d_name; |
184 gchar *filepath = g_strconcat(pathl, "/", name, NULL); | 183 gchar *filepath = g_strconcat(pathl, "/", name, NULL); |
185 if (stat(filepath, &ent_sbuf) >= 0 && S_ISDIR(ent_sbuf.st_mode)) | 184 if (stat(filepath, &ent_sbuf) >= 0 && S_ISDIR(ent_sbuf.st_mode)) |
186 { | 185 { |