diff options
author | elliott_c <ocielliottc@users.noreply.github.com> | 2003-10-16 14:02:49 +0000 |
---|---|---|
committer | elliott_c <ocielliottc@users.noreply.github.com> | 2003-10-16 14:02:49 +0000 |
commit | 5bb341a58b5fc0a4b593a30370a14b4a3df486e2 (patch) | |
tree | 2e5d5bb708a70b8675f32e92f1d11e541b334413 /bin | |
parent | 7efcd65681bf2b8975b99162fd0957dc22705595 (diff) | |
download | ATCD-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.pm | 16 |
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; |