]> Creatis software - crea.git/commitdiff
BUG Files Directory
authorEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Wed, 25 Mar 2009 16:29:33 +0000 (16:29 +0000)
committerEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Wed, 25 Mar 2009 16:29:33 +0000 (16:29 +0000)
src/creaFilesFromDirectory.cxx

index e9d1f46c38a41330616c1124a9abd5f4f9486aed..30558f7ce46c3c7d9f4fba09084df4175b4fca5e 100644 (file)
@@ -3,8 +3,8 @@
   Program:   crea
   Module:    $RCSfile: creaFilesFromDirectory.cxx,v $
   Language:  C++
-  Date:      $Date: 2009/03/19 08:00:50 $
-  Version:   $Revision: 1.3 $
+  Date:      $Date: 2009/03/25 16:29:33 $
+  Version:   $Revision: 1.4 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -135,6 +135,7 @@ int DirList::Explore(std::string const &dirpath, bool recursive)
    dirent *d;
    for (d = readdir(dir); d; d = readdir(dir))
    {
+          
       fileName = dirName + d->d_name;
       if( stat(fileName.c_str(), &buf) != 0 )
       {
@@ -142,8 +143,12 @@ int DirList::Explore(std::string const &dirpath, bool recursive)
       }
       if ( S_ISREG(buf.st_mode) )    //is it a regular file?
       {
-         Filenames.push_back( fileName );
-         numberOfFiles++;
+                 printf("EED DirList::Explore [%s]\n" , d->d_name );
+                 if ( d->d_name[0]!='.')
+                 {     
+                Filenames.push_back( fileName );
+                numberOfFiles++;
+                 }
       }
       else if ( S_ISDIR(buf.st_mode) ) //directory?
       {