Fix issue with file in path#82
Conversation
Codecov Report
@@ Coverage Diff @@
## master #82 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 2 2
Lines 320 320
=====================================
Hits 320 320
Continue to review full report at Codecov.
|
|
Nice PR! Would love if this could be merged! |
| stats = await handlers.stat(absolutePath); | ||
| } catch (err) { | ||
| if (err.code !== 'ENOENT') { | ||
| if (err.code !== 'ENOENT' && err.code !== 'ENOTDIR') { |
There was a problem hiding this comment.
Wouldn't this cause problems with rewrites? When there directory might not exist but a rewrite for it does?
There was a problem hiding this comment.
Not sure I follow, could you provide an example of what you mean?
There was a problem hiding this comment.
Thought there would be problems with such config where static/b doesn't exist
await handler(req, res, {
'rewrites': [
{source: 'static/b/**', destination: '/static/index.html'}
],
});But can confirm, no such problem, my bad.
|
@leo You seem to be the maintainer to pinging you. We get errors in our production logs from this. Would be really great if we could merge this, seems like a safe deploy to me. |
|
@leo thanks! |
Fixes error described in #80. See issue for problem description.
Resolves #80