diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/functiondirectoriesin.cpp | 14 | ||||
-rw-r--r-- | 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 | |||
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 | ||
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 | |||
25 | 25 | ||
26 | struct dirent *e; | 26 | struct dirent *e; |
27 | 27 | ||
28 | std::string prefix = lParams.front() + "/"; | 28 | std::string prefix; |
29 | if( lParams.size() >= 2 ) | ||
30 | { | ||
31 | StringList::iterator i = lParams.begin(); | ||
32 | i++; | ||
33 | prefix = *i; | ||
34 | } | ||
35 | else | ||
36 | { | ||
37 | prefix = lParams.front() + "/"; | ||
38 | } | ||
29 | 39 | ||
30 | while( (e = readdir( d )) ) | 40 | while( (e = readdir( d )) ) |
31 | { | 41 | { |