diff options
Diffstat (limited to 'src/os2.cpp')
-rw-r--r-- | src/os2.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/os2.cpp b/src/os2.cpp index 88ca2fddf..7443e6896 100644 --- a/src/os2.cpp +++ b/src/os2.cpp @@ -114,11 +114,15 @@ bool FiosIsValidFile(const char *path, const struct dirent *ent, struct stat *sb char filename[MAX_PATH]; 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] == '.'; } + static void ChangeWorkingDirectory(char *exe) { char *s = strrchr(exe, PATHSEPCHAR); |