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 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src/functiondirectoriesin.cpp') 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 ); } } -- cgit v1.2.3