summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelliott_c <ocielliottc@users.noreply.github.com>2003-10-16 14:02:49 +0000
committerelliott_c <ocielliottc@users.noreply.github.com>2003-10-16 14:02:49 +0000
commit5bb341a58b5fc0a4b593a30370a14b4a3df486e2 (patch)
tree2e5d5bb708a70b8675f32e92f1d11e541b334413
parent7efcd65681bf2b8975b99162fd0957dc22705595 (diff)
downloadATCD-5bb341a58b5fc0a4b593a30370a14b4a3df486e2.tar.gz
ChangeLogTag: Thu Oct 16 09:02:24 2003 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r--ChangeLog7
-rw-r--r--bin/DependencyGenerator/DependencyGenerator.pm16
2 files changed, 22 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index d1c38a2d1ee..dbc4a857a6d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Thu Oct 16 09:02:24 2003 Chad Elliott <elliott_c@ociweb.com>
+
+ * bin/DependencyGenerator/DependencyGenerator.pm:
+
+ Escape regular expression special characters from strings
+ before they are used as regular expressions.
+
Thu Oct 16 08:37:54 2003 Chad Elliott <elliott_c@ociweb.com>
* apps/gperf/tests/tests.mpc:
diff --git a/bin/DependencyGenerator/DependencyGenerator.pm b/bin/DependencyGenerator/DependencyGenerator.pm
index f84b31ca40e..91053a8a207 100644
--- a/bin/DependencyGenerator/DependencyGenerator.pm
+++ b/bin/DependencyGenerator/DependencyGenerator.pm
@@ -31,12 +31,26 @@ sub new {
$options, $ipaths),
'replace' => $replace,
'dwrite' => DependencyWriterFactory::create($type),
- 'cwd' => Cwd::getcwd() . '/',
+ 'cwd' => undef,
}, $class;
+
+ ## Set the current working directory, but
+ ## escape regular expression special characters
+ $self->{'cwd'} = $self->escape_regex_special(Cwd::getcwd()) . '/';
+
return $self;
}
+sub escape_regex_special {
+ my($self) = shift;
+ my($name) = shift;
+
+ $name =~ s/([\+\-\\\$\[\]\(\)\.])/\\$1/g;
+ return $name;
+}
+
+
sub process {
my($self) = shift;
my($file) = shift;