Mercurial > geeqie
comparison src/ui_tabcomp.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 | 147f4c4b9025 |
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. |
113 /* dir not found */ | 113 /* dir not found */ |
114 return; | 114 return; |
115 } | 115 } |
116 while ((dir = readdir(dp)) != NULL) | 116 while ((dir = readdir(dp)) != NULL) |
117 { | 117 { |
118 /* skips removed files */ | 118 gchar *name = dir->d_name; |
119 if (dir->d_ino > 0) | 119 if (strcmp(name, ".") != 0 && strcmp(name, "..") != 0) |
120 { | 120 { |
121 gchar *name = dir->d_name; | 121 list = g_list_prepend(list, path_to_utf8(name)); |
122 if (strcmp(name, ".") != 0 && strcmp(name, "..") != 0) | 122 } |
123 { | |
124 list = g_list_prepend(list, path_to_utf8(name)); | |
125 } | |
126 } | |
127 } | 123 } |
128 closedir(dp); | 124 closedir(dp); |
129 | 125 |
130 td->dir_path = g_strdup(path); | 126 td->dir_path = g_strdup(path); |
131 td->file_list = list; | 127 td->file_list = list; |