Program: gdcm
Module: $RCSfile: gdcmDirList.cxx,v $
Language: C++
- Date: $Date: 2005/01/14 22:44:39 $
- Version: $Revision: 1.36 $
+ Date: $Date: 2005/01/14 23:51:40 $
+ Version: $Revision: 1.38 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
fileName = fileData.cFileName;
if( fileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY )
{
- // Is the '.' and '..' usefull ?
+ // Need to check for . and .. to avoid infinite loop
if( fileName != "." && fileName != ".." && recursive )
{
numberOfFiles += Explore(dirName+fileName,recursive);
numberOfFiles++;
}
}
- if (hFile != INVALID_FILE_HANDLE) FindClose(hFile);
+ if (hFile != INVALID_HANDLE_VALUE) FindClose(hFile);
#else
// Real POSIX implementation: scandir is a BSD extension only, and doesn't