mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-22 14:23:10 -05:00
KWSys 2015-01-23 (d4e7f08e)
Extract upstream KWSys using the following shell commands.
$ git archive --prefix=upstream-kwsys/ d4e7f08e | tar x
$ git shortlog --no-merges --abbrev=8 --format='%h %s' b33e7b96..d4e7f08e
Brad King (1):
d4e7f08e Directory: Check opendir return value before using it
Change-Id: I3485ec9c7ad3b7f25df610d4d1898c5150a995f0
This commit is contained in:
@@ -244,6 +244,11 @@ unsigned long Directory::GetNumberOfFilesInDirectory(const kwsys_stl::string& na
|
|||||||
{
|
{
|
||||||
DIR* dir = opendir(name.c_str());
|
DIR* dir = opendir(name.c_str());
|
||||||
|
|
||||||
|
if (!dir)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
unsigned long count = 0;
|
unsigned long count = 0;
|
||||||
for (kwsys_dirent* d = readdir(dir); d; d = readdir(dir) )
|
for (kwsys_dirent* d = readdir(dir); d; d = readdir(dir) )
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user