-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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! |
@@ -582,7 +582,7 @@ module.exports = async (request, response, config = {}, methods = {}) => { | |||
try { | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure I follow, could you provide an example of what you mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
@leo thanks! |
Fixes error described in #80. See issue for problem description.
Resolves #80