Skip to content

Commit

Permalink
Fix crash with workspace folders which do not have the file:// scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
FractalBoy authored and Marc Reisner committed Jun 24, 2024
1 parent b183a09 commit d01db94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/lib/PLS/Server/Request/Initialize.pm
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ sub service
$workspace_folders = [] if (ref $workspace_folders ne 'ARRAY');
@{$workspace_folders} = map { $_->{uri} } @{$workspace_folders};
push @{$workspace_folders}, $root_uri if (not scalar @{$workspace_folders} and length $root_uri);
@{$workspace_folders} = map { URI->new($_)->file } @{$workspace_folders};
@{$workspace_folders} = map { $_->file } grep { $_->can('file') } map { URI->new($_) } @{$workspace_folders};

# Create and cache index object
PLS::Parser::Index->new(workspace_folders => $workspace_folders);
Expand Down

0 comments on commit d01db94

Please sign in to comment.