src/os2.cpp
changeset 6566 a780a47d6af3
parent 5842 180c71b8fc14
child 6573 7624f942237f
equal deleted inserted replaced
6565:3cea8776104b 6566:a780a47d6af3
   112 bool FiosIsValidFile(const char *path, const struct dirent *ent, struct stat *sb)
   112 bool FiosIsValidFile(const char *path, const struct dirent *ent, struct stat *sb)
   113 {
   113 {
   114 	char filename[MAX_PATH];
   114 	char filename[MAX_PATH];
   115 
   115 
   116 	snprintf(filename, lengthof(filename), "%s" PATHSEP "%s", path, ent->d_name);
   116 	snprintf(filename, lengthof(filename), "%s" PATHSEP "%s", path, ent->d_name);
   117 	if (stat(filename, sb) != 0) return false;
   117 	return stat(filename, sb) == 0;
   118 
   118 }
   119 	return (ent->d_name[0] != '.'); // hidden file
   119 
   120 }
   120 bool FiosIsHiddenFile(const struct dirent *ent)
       
   121 {
       
   122 	return ent->d_name[0] == '.';
       
   123 }
       
   124 
   121 
   125 
   122 static void ChangeWorkingDirectory(char *exe)
   126 static void ChangeWorkingDirectory(char *exe)
   123 {
   127 {
   124 	char *s = strrchr(exe, PATHSEPCHAR);
   128 	char *s = strrchr(exe, PATHSEPCHAR);
   125 
   129