Skip to content

Commit d00b0c5

Browse files
committed
Update Build.pm
In windows File::Find::&find returns files with backslash (\) separator, so $dest.split fails to find '/doc' in them. See: ``` > say $dest, '=>', $dest.split("$workdir/doc")[1]; C:\rakudo\tests\doc\doc\Type\X\Syntax\Signature\InvocantMarker.pod=>Nil > say $dest, '=>', $dest.split("$workdir\\doc")[1]; C:\rakudo\tests\doc\doc\Type\X\Syntax\Signature\InvocantMarker.pod=>\Type\X\Syntax\Signature\InvocantMarker.pod ```
1 parent 1c0c506 commit d00b0c5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Build.pm

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@ class Build is Panda::Builder {
1212
method build($workdir) {
1313

1414
my $dest-pref = Panda::Installer.new.default-prefix() ~ '/../doc';
15+
my $docdir = IO::Path.new("$workdir/doc").abspath; # An OS independent version
1516

16-
my @files = find(dir => "$workdir/doc", type => 'file').list;
17+
my @files = find(dir => $docdir, type => 'file').list;
1718

1819
for @files -> $file {
1920
next if $file ~~ /'HomePage.pod'$/;
2021

2122
my $dest = $file;
22-
$dest = $dest-pref ~ $dest.split("$workdir/doc")[1];
23+
$dest = $dest-pref ~ $dest.split($docdir)[1];
2324

2425
my $dest-dir = $dest.IO.dirname;
2526
mkpath $dest-dir unless $dest-dir.IO.d;

0 commit comments

Comments
 (0)