aboutsummaryrefslogtreecommitdiff
path: root/src/functiondirectoriesin.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2006-09-20 20:44:16 +0000
committerMike Buland <eichlan@xagasoft.com>2006-09-20 20:44:16 +0000
commit030ab69b236f53357a79fa912956f43f975d79e2 (patch)
tree322a859f16f13ce35e200b0f29a2553df8d07a25 /src/functiondirectoriesin.cpp
parent4ea12e162a40e43faae99225386aedb8a0b9f1c4 (diff)
downloadbuild-030ab69b236f53357a79fa912956f43f975d79e2.tar.gz
build-030ab69b236f53357a79fa912956f43f975d79e2.tar.bz2
build-030ab69b236f53357a79fa912956f43f975d79e2.tar.xz
build-030ab69b236f53357a79fa912956f43f975d79e2.zip
Updated these two functions, they now work exactly how they should.
Diffstat (limited to 'src/functiondirectoriesin.cpp')
-rw-r--r--src/functiondirectoriesin.cpp14
1 files changed, 12 insertions, 2 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
24 24
25 struct dirent *e; 25 struct dirent *e;
26 26
27 //std::string prefix = lParams.front() + "/"; 27 std::string prefix;
28 if( lParams.size() >= 2 )
29 {
30 StringList::iterator i = lParams.begin();
31 i++;
32 prefix = *i;
33 }
34 else
35 {
36 prefix = lParams.front() + "/";
37 }
28 38
29 while( (e = readdir( d )) ) 39 while( (e = readdir( d )) )
30 { 40 {
@@ -32,7 +42,7 @@ void FunctionDirectoriesIn::execute( Build *bld, const StringList &lInput, Strin
32 { 42 {
33 if( e->d_name[0] == '.' || e->d_name[0] == '\0' ) 43 if( e->d_name[0] == '.' || e->d_name[0] == '\0' )
34 continue; 44 continue;
35 lOutput.push_back( e->d_name ); 45 lOutput.push_back( prefix + e->d_name );
36 } 46 }
37 } 47 }
38 48