From 64460698c98bfdc3caf8dbf82086a9b85c0eb43f Mon Sep 17 00:00:00 2001 From: Shark Date: Tue, 27 Aug 2024 01:53:27 +0200 Subject: [PATCH] fix fetcher not finding some URLs --- crates/gosub_net/src/http/fetcher.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/gosub_net/src/http/fetcher.rs b/crates/gosub_net/src/http/fetcher.rs index ffc76baa1..d297492d6 100644 --- a/crates/gosub_net/src/http/fetcher.rs +++ b/crates/gosub_net/src/http/fetcher.rs @@ -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)