mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-13 01:29:02 -05:00
fixed bug in mismatched directory opens consuming file descriptors
This commit is contained in:
@@ -54,7 +54,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -111,12 +110,12 @@ cmDirectory
|
||||
::Load(const char* name)
|
||||
{
|
||||
DIR* dir = opendir(name);
|
||||
if ( !dir )
|
||||
|
||||
if (!dir)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
dir = opendir(name);
|
||||
|
||||
for (dirent* d = readdir(dir); d; d = readdir(dir) )
|
||||
{
|
||||
m_Files.push_back(d->d_name);
|
||||
|
||||
Reference in New Issue
Block a user