Fix problems with slash direction for activestate perl. r=dbaron.

This commit is contained in:
bryner%brianryner.com 2004-09-10 21:16:29 +00:00
Родитель 2a0109a764
Коммит 70f87d9f57
1 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -98,6 +98,9 @@ sub include {
my $directory = $stack->{'variables'}->{'DIRECTORY'};
if ($filename ne '-') {
$filename = File::Spec::_0_8::rel2abs($filename, $directory);
# splitpath expects forward-slash paths on windows, so we have to
# change the slashes if using Activestate Perl.
$filename =~ s?\\?/?g if "$^O" eq "MSWin32";
my($volume, $path) = File::Spec::_0_8::splitpath($filename);
$directory = File::Spec::_0_8::catpath($volume, $path, '');
}