From 030ab69b236f53357a79fa912956f43f975d79e2 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Wed, 20 Sep 2006 20:44:16 +0000 Subject: Updated these two functions, they now work exactly how they should. --- src/functiondirectoriesin.cpp | 14 ++++++++++++-- src/functionfilesin.cpp | 12 +++++++++++- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/src/functiondirectoriesin.cpp b/src/functiondirectoriesin.cpp index 052125e..ef2f097 100644 --- a/src/functiondirectoriesin.cpp +++ b/src/functiondirectoriesin.cpp @@ -24,7 +24,17 @@ void FunctionDirectoriesIn::execute( Build *bld, const StringList &lInput, Strin struct dirent *e; - //std::string prefix = lParams.front() + "/"; + std::string prefix; + if( lParams.size() >= 2 ) + { + StringList::iterator i = lParams.begin(); + i++; + prefix = *i; + } + else + { + prefix = lParams.front() + "/"; + } while( (e = readdir( d )) ) { @@ -32,7 +42,7 @@ void FunctionDirectoriesIn::execute( Build *bld, const StringList &lInput, Strin { if( e->d_name[0] == '.' || e->d_name[0] == '\0' ) continue; - lOutput.push_back( e->d_name ); + lOutput.push_back( prefix + e->d_name ); } } diff --git a/src/functionfilesin.cpp b/src/functionfilesin.cpp index e1a4c2b..9b9187d 100644 --- a/src/functionfilesin.cpp +++ b/src/functionfilesin.cpp @@ -25,7 +25,17 @@ void FunctionFilesIn::execute( Build *bld, const StringList &lInput, StringList struct dirent *e; - std::string prefix = lParams.front() + "/"; + std::string prefix; + if( lParams.size() >= 2 ) + { + StringList::iterator i = lParams.begin(); + i++; + prefix = *i; + } + else + { + prefix = lParams.front() + "/"; + } while( (e = readdir( d )) ) { -- cgit v1.2.3