Unverified Commit 5e90fc6a authored by Bartosz Sosnowski's avatar Bartosz Sosnowski Committed by Michaël Zasso
Browse files

fs: use fs.access in fs.exists

Uses fs.access to implement fs.exists functionality. Fixes a issue,
when a file exists but user does not have privileges to do stat on the
file.

Fixes: https://github.com/nodejs/node/issues/17921

Backport-PR-URL: https://github.com/nodejs/node/pull/19654
PR-URL: https://github.com/nodejs/node/pull/18618


Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
Reviewed-By: default avatarBen Noordhuis <info@bnoordhuis.nl>
Reviewed-By: default avatarRichard Lau <riclau@uk.ibm.com>
Reviewed-By: default avatarWeijia Wang <starkwang@126.com>
Reviewed-By: default avatarJoyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: default avatarRuben Bridgewater <ruben@bridgewater.de>
Reviewed-By: default avatarEvan Lucas <evanlucas@me.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
parent ae86adc0
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment