Skip to content

Commit

Permalink
Merge pull request #570 from Sharktheone/fetcher/file-not-found
Browse files Browse the repository at this point in the history
fix fetcher not finding some URLs
  • Loading branch information
Sharktheone authored Aug 27, 2024
2 parents 7291b75 + 6446069 commit b968b1b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/gosub_net/src/http/fetcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ impl Fetcher {

response.try_into()?
} else if scheme == "file" {
let path = url.path();
let path = &url.as_str()[7..];

let body = std::fs::read(path)?;

Response::from(body)
Expand Down

0 comments on commit b968b1b

Please sign in to comment.