viso: Check for directory without S_ISDIR macro for msvc

This commit is contained in:
cold-brewed
2022-10-18 14:20:33 -04:00
parent 2d12f0d174
commit b81d4170f9

View File

@@ -148,7 +148,7 @@ bin_init(const char *filename, int *error)
/* Use a blank structure if stat failed. */
memset(&stats, 0, sizeof(struct stat));
}
*error = ((tf->file == NULL) || (S_ISDIR(stats.st_mode)));
*error = ((tf->file == NULL) || ((stats.st_mode & S_IFMT) == S_IFDIR));
/* Set the function pointers. */
if (!*error) {