Skip to content

Commit

Permalink
Item14605: More unescaped { braces
Browse files Browse the repository at this point in the history
  • Loading branch information
gac410 committed Jan 21, 2018
1 parent a3d11f5 commit 9ae136a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion core/lib/Foswiki/Configure/Checkers/AccessibleCFG.pm
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ sub check_current_value {
if ( ref($v) ) {
$reporter->ERROR("Was expecting entry $ec to be a scalar");
}
if ( $v !~ /^({\w+})+$/ ) {
if ( $v !~ /^(\{\w+\})+$/ ) {
$reporter->ERROR("Was expecting '$v' to be a cfg key");
}
$ec++;
Expand Down
6 changes: 3 additions & 3 deletions core/lib/Foswiki/Configure/Checkers/WorkingDir.pm
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ If compression is enabled, it also compresses the language file.
sub onSave {
my ( $this, $reporter, $key, $d, $old_dir ) = @_;

$d =~ s/\$Foswiki::cfg({\w+})+/eval( "\$Foswiki::cfg$1")/ge;
$old_dir =~ s/\$Foswiki::cfg({\w+})+/eval( "\$Foswiki::cfg$1")/ge;
$d =~ s/\$Foswiki::cfg(\{\w+\})+/eval( "\$Foswiki::cfg$1")/ge;
$old_dir =~ s/\$Foswiki::cfg(\{\w+\})+/eval( "\$Foswiki::cfg$1")/ge;

return if ( $d eq $old_dir );

Expand Down Expand Up @@ -109,7 +109,7 @@ sub onSave {

# Automatic upgrade of work_areas
my $existing = $old_dir || $Foswiki::cfg{Store}{WorkAreaDir} || '';
$existing =~ s/\$Foswiki::cfg({\w+})+/eval( "$Foswiki::cfg$1")/ge;
$existing =~ s/\$Foswiki::cfg(\{\w+\})+/eval( "$Foswiki::cfg$1")/ge;
if ( $existing && -d $existing ) {

# Try and move the contents of the old workarea
Expand Down

0 comments on commit 9ae136a

Please sign in to comment.