X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmDirList.cxx;h=e30f633728778482278b0bd9a99bff737d5fdd9c;hb=26d4556cd9769bba7d3df71ed994cd1a5efa0016;hp=265f4b4f68891f11558f3b816b32fe85e3e4c294;hpb=8b0d3c6c373474dc31af9eb56cf949298a723a76;p=gdcm.git diff --git a/src/gdcmDirList.cxx b/src/gdcmDirList.cxx index 265f4b4f..e30f6337 100644 --- a/src/gdcmDirList.cxx +++ b/src/gdcmDirList.cxx @@ -1,14 +1,32 @@ -// gdcmDirList.cxx -//----------------------------------------------------------------------------- +/*========================================================================= + + Program: gdcm + Module: $RCSfile: gdcmDirList.cxx,v $ + Language: C++ + Date: $Date: 2004/06/20 18:08:47 $ + Version: $Revision: 1.16 $ + + Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de + l'Image). All rights reserved. See Doc/License.txt or + http://www.creatis.insa-lyon.fr/Public/Gdcm/License.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + #include "gdcmDirList.h" #include "gdcmUtil.h" #include #include -#ifdef _MSC_VER +#if defined(_MSC_VER) || defined (__CYGWIN__) #include +#ifdef _MSC_VER #include +#endif //_MSC_VER #else #include #include @@ -24,7 +42,6 @@ gdcmDirList::gdcmDirList(std::string dirName,bool recursive) { name=dirName; - NormalizePath(name); Explore(name,recursive); } @@ -69,8 +86,7 @@ void gdcmDirList::Explore(std::string dirName,bool recursive) std::string fileName; NormalizePath(dirName); - -#ifdef _MSC_VER +#if defined(_MSC_VER) || (__CYGWIN__) WIN32_FIND_DATA fileData; HANDLE hFile=FindFirstFile((dirName+"*").c_str(),&fileData); int found=true; @@ -97,7 +113,7 @@ void gdcmDirList::Explore(std::string dirName,bool recursive) for (int i= 0;i < n; i++) { - fileName=namelist[i]->d_name; + fileName=namelist[i]->d_name; if(namelist[i]->d_type==DT_DIR) { if( (fileName!=".") && (fileName!="..") && (recursive) )