-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
module: fix stat with long paths on windows #2013
Conversation
var fileNameLen = Math.max(261 - common.tmpDir.length - 1, 1); | ||
var fileName = path.join(common.tmpDir, new Array(fileNameLen + 1).join('x')); | ||
var fullPath = path.resolve(fileName); | ||
const dirNameLen = Math.max(261 - common.tmpDir.length - 1, 1); |
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.
IMO, 260 - common.tmpDir.length
is simpler.
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.
True. I changed it
9a4c26a
to
f448125
Compare
addressed @yosuke-furukawa comments. |
f448125
to
61e66e0
Compare
LGTM |
LGTM but what's the reason for modifying an existing test instead of adding a new one? Two regression tests are better than one. |
Sorry, I thought it would be redundant. |
PR-URL: #2013 Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
landed @ a4f4909 |
Fix from #2011 with is an updated regression test that fails without the patch.
v2.2.1
master
master with fix
No error !