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:
parent
77444a7d48
commit
0b9aad7568
|
@ -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) )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue