mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-03 12:49:50 -05:00
Merge branch 'backport-kwsys-directory-check-opendir' into release
This commit is contained in:
@@ -239,6 +239,11 @@ unsigned long Directory::GetNumberOfFilesInDirectory(const kwsys_stl::string& na
|
||||
{
|
||||
DIR* dir = opendir(name.c_str());
|
||||
|
||||
if (!dir)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
unsigned long count = 0;
|
||||
for (dirent* d = readdir(dir); d; d = readdir(dir) )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user