From 76d2d78ac48c0ec7fcdc27c841d0777cab732464 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Sat, 1 Nov 2014 10:14:16 +0100 Subject: fdo#85633 filter out empty file records Change-Id: I9f96cf3e059d444c52ce81b37cf5f69157c2888d --- solenv/bin/modules/par2script/work.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/solenv/bin/modules/par2script/work.pm b/solenv/bin/modules/par2script/work.pm index 9c03078cdf17..80037850bcc4 100644 --- a/solenv/bin/modules/par2script/work.pm +++ b/solenv/bin/modules/par2script/work.pm @@ -187,6 +187,11 @@ sub collect_definitions if ( $oneitem eq "Directory" ) { if ( $itemkey =~ "DosName" ) { $itemkey =~ s/DosName/HostName/; } } if (( $oneitem eq "Directory" ) || ( $oneitem eq "File" ) || ( $oneitem eq "Unixlink" )) { if ( $itemvalue eq "PD_PROGDIR" ) { $itemvalue = "PREDEFINED_PROGDIR"; }} if (( $itemkey eq "Styles" ) && ( $itemvalue =~ /^\s*(\w+)(\s*\;\s*)$/ )) { $itemvalue = "($1)$2"; } + elsif ( $itemkey eq "Files" ) # filter out empty file records, as they mess up assignment to modules + { + $itemvalue =~ /^\(([^)]*)\)$/; + $itemvalue = '(' . join( ',', grep( !/^$/, split( ',', $1 ) ) ) . ')'; + } $oneitemhash{$itemkey} = $itemvalue; } -- cgit