]> Creatis software - bbtk.git/commitdiff
#3049 BBTK Bug New Normal - package:std box:FilesFromDirectory NormalizePath
authorEduardo DAVILA <eduardo.davila@creatis.insa-lyon.fr>
Wed, 28 Dec 2016 13:52:49 +0000 (14:52 +0100)
committerEduardo DAVILA <eduardo.davila@creatis.insa-lyon.fr>
Wed, 28 Dec 2016 13:52:49 +0000 (14:52 +0100)
packages/std/src/bbstdFilesFromDirectory.cxx

index 6e097ee1aa0a97815a22c0d0d6bbd6cbcc6c473e..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;
    }