(svn r14656) -Change: replace instances of x & S_IFREG with S_ISREG(x) as S_IFREG can be 0 on some platforms.

This commit is contained in:
rubidium
2008-12-05 18:02:04 +00:00
parent 1b91ec49c8
commit bcb9a11754
2 changed files with 4 additions and 4 deletions

View File

@@ -711,12 +711,12 @@ static int ScanPathForTarFiles(const char *path, size_t basepath_length)
snprintf(filename, lengthof(filename), "%s%s", path, d_name);
if (sb.st_mode & S_IFDIR) {
if (S_ISDIR(sb.st_mode)) {
/* Directory */
if (strcmp(d_name, ".") == 0 || strcmp(d_name, "..") == 0) continue;
AppendPathSeparator(filename, lengthof(filename));
num += ScanPathForTarFiles(filename, basepath_length);
} else if (sb.st_mode & S_IFREG) {
} else if (S_ISREG(sb.st_mode)) {
/* File */
char *ext = strrchr(filename, '.');