Skip to content

Commit d1a3c70

Browse files
authored
Merge pull request #58 from StrawberryPerl/mirror_url_basenames
Strawberry.pm: Allow for backslashes in file URLs when getting basenames
2 parents ec55cb5 + c94da33 commit d1a3c70

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

lib/Perl/Dist/Strawberry.pm

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,9 @@ sub mirror_url {
452452

453453
# Check if the file already is downloaded.
454454
my $file = $url;
455-
$file =~ s|^.+\/||;# Delete anything before the last forward slash, leaves only the filename.
455+
# Delete anything before the last slash, leaves only the filename.
456+
# The backward slashes allow for file URLs.
457+
$file =~ s|^.+[/\\]||;
456458
my $target = catfile( $dir, $file );
457459

458460
return $target if $self->global->{offline} and -f $target;

0 commit comments

Comments
 (0)