Commit 095dcf89 authored by Claes Sjofors's avatar Claes Sjofors

Wb build import, target can be a list

parent 82f6d6d5
......@@ -105,7 +105,7 @@ SObject pwrb:Class
! Options.
! - BuildAfterNode, export is automatically built before any
! node is built.
! - BuildBeforeNode, directory is automatically built before any
! - BuildBeforeNode, export is automatically built before any
! node is built.
!*/
Object Options $Attribute 4
......
......@@ -2584,6 +2584,8 @@ pwr_tStatus lfu_SaveDirectoryVolume(
switch ( cid) {
case pwr_cClass_ApplImport: {
char target_array[10][80];
int target_cnt;
sts = ldh_GetObjectPar( ldhses, appoid, "DevBody",
"Source", (char **)&source_ptr, &size);
......@@ -2593,8 +2595,14 @@ pwr_tStatus lfu_SaveDirectoryVolume(
"Target", (char **)&target_ptr, &size);
if ( EVEN(sts)) return sts;
fprintf( file, "import %d %s%s %s\n", current_options, dir, source_ptr, target_ptr);
// Target can be a list
target_cnt = dcli_parse( target_ptr, ",", "", (char *)target_array,
sizeof(target_array)/sizeof(target_array[0]),
sizeof(target_array[0]), 0);
for ( int i = 0; i < target_cnt; i++) {
dcli_trim( target_array[i], target_array[i]);
fprintf( file, "import %d %s%s %s\n", current_options, dir, source_ptr, target_array[i]);
}
free( source_ptr);
free( target_ptr);
break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment