From ba9752d33c940ea0689e436243c5c65a71a74788 Mon Sep 17 00:00:00 2001 From: CallMeVerity Date: Wed, 3 Jun 2026 01:43:24 +0100 Subject: [PATCH] Fix directory EISDIR on root path, remove favicon --- backend/src/index.ts | 5 +++-- frontend/public/favicon.svg | 4 ---- 2 files changed, 3 insertions(+), 6 deletions(-) delete mode 100644 frontend/public/favicon.svg diff --git a/backend/src/index.ts b/backend/src/index.ts index e50bf3f..08d6aca 100644 --- a/backend/src/index.ts +++ b/backend/src/index.ts @@ -3,7 +3,7 @@ import { cors } from "@elysiajs/cors"; import { videoRoutes } from "./routes/videos"; import { initDb } from "./services/db"; import { join } from "path"; -import { existsSync } from "fs"; +import { existsSync, statSync } from "fs"; initDb(); @@ -25,7 +25,8 @@ const app = new Elysia() if (pathname.startsWith("/api")) return status(404, "Not found"); const filePath = join(STATIC_DIR, pathname); - if (existsSync(filePath)) return Bun.file(filePath); + if (existsSync(filePath) && statSync(filePath).isFile()) + return Bun.file(filePath); const indexPath = join(STATIC_DIR, "index.html"); if (existsSync(indexPath)) return Bun.file(indexPath); diff --git a/frontend/public/favicon.svg b/frontend/public/favicon.svg deleted file mode 100644 index c823885..0000000 --- a/frontend/public/favicon.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - -