Skip to content

Commit c94da33

Browse files
committed
Strawberry.pm: Allow for backslashes in file URLs when getting basenames
File URLs are converted to backslashes somewhere along the line so this is needed to make them usable.
1 parent ec55cb5 commit c94da33

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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)