From: Eric Bollengier Date: Mon, 21 Feb 2011 14:41:01 +0000 (+0100) Subject: regress: fix add_attribute() function in perl lib X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d752ec2edbbd77a613727e3d134390b80207d59e;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; }