Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

fs.existsSync incorrectly returning false on long filenames since 0.8.0 upgrade #3739

Closed
nickminutello opened this Issue · 7 comments

3 participants

@nickminutello

It seems to be related to long filenames (OS occasionally complains it cant delete that file because the path is too long)

To demonstrate:

fs.existsSync('E:/dev/projects/mooomooo/test/test-data/playback/instrumentInputsTestsScenario/http-%2FtaggedDependencies%2Fdiff%2Fd955f661-d870-4328-a3dd-97b53c4ed1eb%2C4a89333a-0840-4773-a609-7fcc169661c2%2Ftrade%2FHKE5%2FListedOption%2FXTO%2FH0001%252FHSO%252030Q2%2520P92.5%2520HKZ5.json')

Returns false:

However,

fs.readFileSync('E:/dev/projects/mooomooo/test/test-data/playback/instrumentInputsTestsScenario/http-%2FtaggedDependencies%2Fdiff%2Fd955f661-d870-4328-a3dd-97b53c4ed1eb%2C4a89333a-0840-4773-a609-7fcc169661c2%2Ftrade%2FHKE5%2FListedOption%2FXTO%2FH0001%252FHSO%252030Q2%2520P92.5%2520HKZ5.json').toString()

Returns the file contents:

This is with node 0.8.0. On windows (havent checked to see if we see the same problem on the mac/linux)

Previous version we used (0.6.something), using path.existsSync(), worked fine.

@bnoordhuis

Can you retest with 0.8.2? I think this got fixed.

@nickminutello

Ok. I'll try and let you know.
Cheers

@nickminutello

Just tried 0.8.3 (x64) ... problem still exists.

@bnoordhuis

Okay, thanks. We'll look into it.

/cc @piscisaureus

@piscisaureus

Confirmed.

@isaacs / @bnoordhuis Can one of you review 9174e0c ?

@piscisaureus

@indutny LGTM-ed

@nickminutello

Brilliant. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.