summaryrefslogtreecommitdiffstats
path: root/Source/cmDirectory.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2001-09-07 14:08:03 (GMT)
committerKen Martin <ken.martin@kitware.com>2001-09-07 14:08:03 (GMT)
commitea2690d667d0bb94dabed8206e8df7625e38a490 (patch)
tree9eccd3a7119b894c70caa97898a0340f009ad271 /Source/cmDirectory.cxx
parent55e453a317c27d0031a982dd7cb48ff4f849d6fd (diff)
downloadCMake-ea2690d667d0bb94dabed8206e8df7625e38a490.zip
CMake-ea2690d667d0bb94dabed8206e8df7625e38a490.tar.gz
CMake-ea2690d667d0bb94dabed8206e8df7625e38a490.tar.bz2
fixed bug in mismatched directory opens consuming file descriptors
Diffstat (limited to 'Source/cmDirectory.cxx')
-rw-r--r--Source/cmDirectory.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/Source/cmDirectory.cxx b/Source/cmDirectory.cxx
index 8fbabc6..09f18fb 100644
--- a/Source/cmDirectory.cxx
+++ b/Source/cmDirectory.cxx
@@ -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);