Skip to content

Conversation

@Xstoudi
Copy link
Contributor

@Xstoudi Xstoudi commented Dec 28, 2025

In fs.realpath and fs.realpathSync, path resolution is now performed after symlink traversal instead of before, ensuring correct behavior when dealing with parent directory references (..) in paths containing symlinks.

Fixes: #60779

I may be unaware of full implications of this change, feel free to let me know if it's not the right way to fix it.

In `fs.realpath` and `fs.realpathSync`, path resolution is now performed
after symlink traversal instead of before, ensuring correct behavior
when dealing with parent directory references (`..`) in paths containing
symlinks.

Fixes: nodejs#60779
@nodejs-github-bot nodejs-github-bot added fs Issues and PRs related to the fs subsystem / file system. needs-ci PRs that need a full CI run. labels Dec 28, 2025
@codecov
Copy link

codecov bot commented Dec 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.53%. Comparing base (15bdf38) to head (e2b2166).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #61194   +/-   ##
=======================================
  Coverage   88.53%   88.53%           
=======================================
  Files         703      703           
  Lines      208598   208601    +3     
  Branches    40227    40226    -1     
=======================================
+ Hits       184674   184683    +9     
+ Misses      15951    15939   -12     
- Partials     7973     7979    +6     
Files with missing lines Coverage Δ
lib/fs.js 98.19% <100.00%> (+<0.01%) ⬆️

... and 31 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fs Issues and PRs related to the fs subsystem / file system. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fs.realpathSync does not behave expected

2 participants