]> Creatis software - bbtk.git/blobdiff - packages/std/src/bbstdFilesFromDirectory.cxx
#3103 BBTK Feature New Normal - Code style
[bbtk.git] / packages / std / src / bbstdFilesFromDirectory.cxx
index 7560fd896335b377d8a6803593fc3d2304aee2a9..e444b9ba1a84291479c94335389004a9c255b16d 100644 (file)
@@ -52,7 +52,7 @@ void FilesFromDirectory::Process()
        DirName         = bbGetInputIn();
        bool rec        = bbGetInputRecursive();
        /*int nbFiles = */ Explore(DirName, rec);
-       CleanFilenames( bbGetInputIn() );
+       CleanFilenames( DirName );
        bbSetOutputOut(Filenames);   
        bbSetOutputOutSimple(SimpleFilenames);   
 }
@@ -87,7 +87,7 @@ std::string FilesFromDirectory::NormalizePath(std::string const &pathname)
    std::string name = pathname;
    int size = name.size();
 
-   if ( name[size-1] != FILESEPARATOR )
+   if (!((name[size-1]=='/')||(name[size-1]=='\\')))
    {
       name += FILESEPARATOR;
    }
@@ -141,6 +141,7 @@ int FilesFromDirectory::Explore(std::string const &dirpath, bool recursive)
                        numberOfFiles           =       numberOfFiles + tmpNumberOfFiles;
          } // if recursive
          if ( fileName != "." && fileName != ".." && !recursive )
+                {
                        if ((bbGetInputType()==1) || (bbGetInputType()==2))
                        {
                        std::string temp = dirName+fileName;