Mercurial > hg > openttd
diff src/unix.cpp @ 6240:1d99c3541c11 draft
(svn r9043) -Fix [FS#652]: the personal (.openttd) directories were hidden in the load/save directory listings (stepancheg).
author | rubidium <rubidium@openttd.org> |
---|---|
date | Tue, 06 Mar 2007 22:37:04 +0000 |
parents | 77a5708ac3f8 |
children | 57363e064324 |
line wrap: on
line diff
--- a/src/unix.cpp +++ b/src/unix.cpp @@ -92,9 +92,12 @@ #endif snprintf(filename, lengthof(filename), "%s" PATHSEP "%s", path, ent->d_name); - if (stat(filename, sb) != 0) return false; + return stat(filename, sb) == 0; +} - return (ent->d_name[0] != '.'); // hidden file +bool FiosIsHiddenFile(const struct dirent *ent) +{ + return ent->d_name[0] == '.'; } #if defined(__BEOS__) || defined(__linux__)