summaryrefslogtreecommitdiff
path: root/bin
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 /bin
parent7efcd65681bf2b8975b99162fd0957dc22705595 (diff)
downloadATCD-5bb341a58b5fc0a4b593a30370a14b4a3df486e2.tar.gz
ChangeLogTag: Thu Oct 16 09:02:24 2003 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'bin')
-rw-r--r--bin/DependencyGenerator/DependencyGenerator.pm16
1 files changed, 15 insertions, 1 deletions
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;