From: Eric Bollengier Date: Thu, 17 Sep 2015 09:46:16 +0000 (+0200) Subject: regress: Allow to use value with spaces in add_attribute() X-Git-Tag: Release-7.4.0~196 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=23626555579e41d3e327252c5e5e6a970c4cce51;p=bacula%2Fbacula regress: Allow to use value with spaces in add_attribute() --- diff --git a/regress/scripts/functions.pm b/regress/scripts/functions.pm index 57f63816c3..b73277637f 100644 --- a/regress/scripts/functions.pm +++ b/regress/scripts/functions.pm @@ -727,6 +727,9 @@ sub add_attribute my ($cur_obj, $cur_name, $done); my $is_options = $obj && $obj eq 'Options'; + if ($value =~ /\s/ && $value !~ m:[/"]:) { # exclude speed from the escape + $value = "\"$value\""; + } open(FP, ">$tmp/1.$$") or die "Can't write to $tmp/1.$$"; open(SRC, $file) or die "Can't open $file"; while (my $l = )