Makefile: SunOS 5.6 portability fix
[gitweb.git] / git-cvsserver.perl
index 28041060c8a36ac2b89ee179501c2ec726f4606b..13751db882dd2c40e2c78503eba0d3f941297644 100755 (executable)
@@ -408,7 +408,7 @@ sub req_Directory
     $state->{localdir} = $data;
     $state->{repository} = $repository;
     $state->{path} = $repository;
-    $state->{path} =~ s/^$state->{CVSROOT}\///;
+    $state->{path} =~ s/^\Q$state->{CVSROOT}\E\///;
     $state->{module} = $1 if ($state->{path} =~ s/^(.*?)(\/|$)//);
     $state->{path} .= "/" if ( $state->{path} =~ /\S/ );