Skip to content

Commit

Permalink
use S_ISREG to check is a regular file?
Browse files Browse the repository at this point in the history
  • Loading branch information
halx99 committed Nov 27, 2019
1 parent 4a040ef commit 02c18d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cocos/platform/android/CCFileUtils-android.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ bool FileUtilsAndroid::isFileExistInternal(const std::string& strFilePath) const
{
struct stat64 st;
if (0 == ::stat64(strFilePath.c_str(), &st))
bFound = st.st_mode & S_IFREG;
bFound = S_ISREG(st.st_mode);
}
return bFound;
}
Expand Down

0 comments on commit 02c18d6

Please sign in to comment.