@samitouri / QOSami-HFS / commits / 10d9db34

avoid console spam about EISDIR fetching /~/frontend/assets

Massimo Melina committed Jun 17, 2026 at 19:10 UTC 10d9db34b4aef4b3d01adf0c2608abd32e397edb
1 file changed +1 -1
src/serveGuiFiles.ts
+1 -1
@@ -44,7 +44,7 @@ function serveStatic(uri: string): Koa.Middleware {
44 const fullPath = join(__dirname, '..', folder, serveApp ? '/index.html': ctx.path)
45 const content = await parseFile(fullPath, raw => serveApp || !raw.length ? raw : adjustBundlerLinks(ctx, uri, raw), 1000)
46 .catch(e => {
47 - if (e?.code !== 'ENOENT') // not supposed to happen, and yet a user reported a strange behavior
47 + if (!/^(?:ENOENT|EISDIR)$/.test(e?.code)) // not supposed to happen, and yet a user reported a strange behavior
48 console.error(`serveStatic/parseFile: ${String(e)}`)
49 return null
50 })