Skip to content

module: fix stat with long paths on windows - #2013

Closed
targos wants to merge 1 commit into
nodejs:masterfrom
targos:fix-module-long-path-windows
Closed

module: fix stat with long paths on windows#2013
targos wants to merge 1 commit into
nodejs:masterfrom
targos:fix-module-long-path-windows

Conversation

@targos

Copy link
Copy Markdown
Member

Fix from #2011 with is an updated regression test that fails without the patch.

v2.2.1

Error: Cannot find module 'D:\Documents\GitHub\io.js\test\tmp\xxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\index.js'

master

Error: Cannot find module './other'

master with fix

No error !

@mscdexmscdex added module Issues and PRs related to the module subsystem. windows Issues and PRs related to the Windows platform. labels Jun 18, 2015
@yosuke-furukawa

Copy link
Copy Markdown
Member

Copy link
Copy Markdown
Member

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.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True. I changed it

@silverwindsilverwind mentioned this pull request Jun 19, 2015
@targos
targosforce-pushed the fix-module-long-path-windows branch from 9a4c26a to f448125CompareJune 19, 2015 06:10
@targos

Copy link
Copy Markdown
MemberAuthor

addressed @yosuke-furukawa comments.
I removed the assert part so it is clearer that we are checking the require call itself, not what it returns.

@targos
targosforce-pushed the fix-module-long-path-windows branch from f448125 to 61e66e0CompareJune 19, 2015 06:15
@yosuke-furukawa

Copy link
Copy Markdown
Member

LGTM

@bnoordhuis

Copy link
Copy Markdown
Member

LGTM but what's the reason for modifying an existing test instead of adding a new one? Two regression tests are better than one.

@targos

Copy link
Copy Markdown
MemberAuthor

Sorry, I thought it would be redundant.
require(indexFile) is like the existing test and the nested require('./other') is testing the new fix (it needs a parent directory with long path).
So the test for the new fix needs the other one to pass.

rvagg pushed a commit that referenced this pull request Jun 22, 2015
PR-URL: #2013
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
@rvagg

Copy link
Copy Markdown
Member

landed @ a4f4909

@rvaggrvagg closed this Jun 22, 2015
@targos
targos deleted the fix-module-long-path-windows branch June 22, 2015 12:31
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

moduleIssues and PRs related to the module subsystem.windowsIssues and PRs related to the Windows platform.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@targos@yosuke-furukawa@bnoordhuis@rvagg@mscdex