From: Eric Bollengier Date: Mon, 21 Feb 2011 14:41:01 +0000 (+0100) Subject: regress: fix add_attribute() function in perl lib X-Git-Tag: Release-7.0.0~1117 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2ef6db90f4c95bd6ad0792eb0867a966b8ff2b2e;p=bacula%2Fbacula regress: fix add_attribute() function in perl lib --- diff --git a/regress/scripts/functions.pm b/regress/scripts/functions.pm index 9fb4416cde..46f0a69e23 100644 --- a/regress/scripts/functions.pm +++ b/regress/scripts/functions.pm @@ -388,7 +388,7 @@ sub add_attribute $done=0; } - if ($l =~ /\Q$attr\E/i) { + if ($l =~ /^\s*\Q$attr\E/i) { if (!$obj || $cur_obj eq $obj) { if (!$name || $cur_name eq $name) { $l =~ s/\Q$attr\E\s*=\s*.+/$attr = $value/ig; @@ -397,7 +397,7 @@ sub add_attribute } } - if ($l =~ /Name\s*=\s*"?([\w\d\.-]+)"?/i) { + if ($l =~ /^\s*Name\s*=\s*"?([\w\d\.-]+)"?/i) { $cur_name = $1; }