Skip to content

Commit

Permalink
🚑️ Fix stable builds
Browse files Browse the repository at this point in the history
  • Loading branch information
RemiBardon committed Aug 25, 2024
1 parent 3a019c5 commit 167068d
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/orangutan-server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ fn not_found() -> Result<Response<ServeFileSystemResponseBody>, Response> {
})?;

let file_path = website_dir.join(NOT_FOUND_FILE);
match fs::exists(&file_path) {
Ok(true) => {
match fs::metadata(&file_path) {
Ok(_) => {
let res = tokio::task::block_in_place(move || {
Handle::current().block_on(async move {
ServeFile::new(file_path.clone())
Expand All @@ -134,13 +134,6 @@ fn not_found() -> Result<Response<ServeFileSystemResponseBody>, Response> {
});
Ok(res)
},
Ok(false) => {
error(format!(
"Could not read \"not found\" file at <{}>: File doesn't exist.",
file_path.display(),
));
Err(fallback())
},
Err(err) => {
error(format!(
"Could not read \"not found\" file at <{}>: {err}",
Expand Down

0 comments on commit 167068d

Please sign in to comment.