diff options
author | Brad King <brad.king@kitware.com> | 2015-01-26 14:51:55 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-01-26 14:51:55 (GMT) |
commit | cb243cce13e23882ca5d39b860cc747812874f04 (patch) | |
tree | 597a8e8004fe46b3b2193386d24680758b23b4e3 | |
parent | dfdcc42c60c723200a0ec9dc0c49e9765384733a (diff) | |
parent | 391748d57e090c53f6c55ea265e038fde1bca032 (diff) | |
download | CMake-cb243cce13e23882ca5d39b860cc747812874f04.zip CMake-cb243cce13e23882ca5d39b860cc747812874f04.tar.gz CMake-cb243cce13e23882ca5d39b860cc747812874f04.tar.bz2 |
Merge topic 'update-kwsys'
391748d5 Merge branch 'upstream-kwsys' into update-kwsys
0b9aad75 KWSys 2015-01-23 (d4e7f08e)
-rw-r--r-- | Source/kwsys/Directory.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/kwsys/Directory.cxx b/Source/kwsys/Directory.cxx index 04b2866..58cea63 100644 --- a/Source/kwsys/Directory.cxx +++ b/Source/kwsys/Directory.cxx @@ -244,6 +244,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 (kwsys_dirent* d = readdir(dir); d; d = readdir(dir) ) { |