Skip to content

vfs: make lchmod update symlink mode#64350

Open
trivikr wants to merge 1 commit into
nodejs:mainfrom
trivikr:vfs-lchmod-symlink
Open

vfs: make lchmod update symlink mode#64350
trivikr wants to merge 1 commit into
nodejs:mainfrom
trivikr:vfs-lchmod-symlink

Conversation

@trivikr

@trivikr trivikr commented Jul 8, 2026

Copy link
Copy Markdown
Member

Fixes: #64349

Fixes fs.promises.lchmod() on mounted VFS paths so it updates the symbolic
link's own mode instead of following the link and changing the target file mode.

This adds a non-following lchmodSync() provider operation for the memory and
real filesystem providers, and routes VFS promise lchmod() through it.


Assisted-by: openai:gpt-5.5

Use a non-following provider operation for lchmod so it updates the
symbolic link metadata instead of changing the target file mode.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: openai:gpt-5.5
@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. vfs Issues and PRs related to the virtual filesystem subsystem. labels Jul 8, 2026
@trivikr trivikr added the request-ci Add this label to start a Jenkins CI on a PR. label Jul 8, 2026
@MuruganBalachandran

This comment was marked as spam.

@codecov

codecov Bot commented Jul 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 68.42105% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.25%. Comparing base (8e1ab55) to head (371f598).

Files with missing lines Patch % Lines
lib/internal/vfs/providers/real.js 45.45% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #64350      +/-   ##
==========================================
+ Coverage   90.23%   90.25%   +0.01%     
==========================================
  Files         741      741              
  Lines      240979   240997      +18     
  Branches    45395    45401       +6     
==========================================
+ Hits       217450   217505      +55     
+ Misses      15112    15070      -42     
- Partials     8417     8422       +5     
Files with missing lines Coverage Δ
lib/internal/vfs/file_system.js 99.37% <100.00%> (+0.15%) ⬆️
lib/internal/vfs/providers/memory.js 95.03% <100.00%> (+0.03%) ⬆️
lib/internal/vfs/providers/real.js 95.09% <45.45%> (-0.98%) ⬇️

... and 30 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

needs-ci PRs that need a full CI run. request-ci Add this label to start a Jenkins CI on a PR. vfs Issues and PRs related to the virtual filesystem subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

vfs: lchmod follows symlinks instead of updating the link

3 participants