mikymod 12 лет назад
Родитель
Сommit
5115cc0769
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      src/os/linux/LinuxOS.cpp

+ 2 - 2
src/os/linux/LinuxOS.cpp

@@ -137,7 +137,7 @@ bool is_dir(const char* path)
 	struct stat info;
 	memset(&info, 0, sizeof(struct stat));
 	lstat(path, &info);
-	return ((S_ISDIR(info.st_mode)) != 0 && (S_ISLNK(info.st_mode) == 0));
+	return ((S_ISDIR(info.st_mode) == 1) && (S_ISLNK(info.st_mode) == 0));
 }
 
 //-----------------------------------------------------------------------------
@@ -146,7 +146,7 @@ bool is_reg(const char* path)
 	struct stat info;
 	memset(&info, 0, sizeof(struct stat));
 	lstat(path, &info);
-	return ((S_ISREG(info.st_mode) != 0) && (S_ISLNK(info.st_mode) == 0));
+	return ((S_ISREG(info.st_mode) == 1) && (S_ISLNK(info.st_mode) == 0));
 }
 
 //-----------------------------------------------------------------------------