Repository navigation
fix: remove read-only files with fs.rmSync on Windows - #54180
Merged
Merged
Conversation
Electron's libc++ builds fail with EPERM for read-only files on Windows. Backport nodejs/node@2987a5965f1f to clear the attribute and retry removal. Fixes #52253. Assisted-By: GitHub Copilot
MarshallOfSound
approved these changes
Sep 21, 2026
|
Release Notes Persisted
|
This was referenced Sep 21, 2026
Contributor
|
I have automatically backported this PR to "43-x-y", please check out #54187 |
Contributor
|
I have automatically backported this PR to "42-x-y", please check out #54188 |
Contributor
|
I have automatically backported this PR to "44-x-y", please check out #54189 |
Contributor
|
I have automatically backported this PR to "45-x-y", please check out #54190 |
Contributor
|
@MarshallOfSound has manually backported this PR to "44-x-y", please check out #54255 |
This was referenced Sep 23, 2026
Contributor
|
@MarshallOfSound has manually backported this PR to "43-x-y", please check out #54256 |
Contributor
|
@MarshallOfSound has manually backported this PR to "42-x-y", please check out #54257 |
dsanders11
pushed a commit
that referenced
this pull request
Sep 23, 2026
fix: remove read-only files with fs.rmSync on Windows (#54180) fix: remove read-only files with fs.rmSync Electron's libc++ builds fail with EPERM for read-only files on Windows. Backport nodejs/node@2987a5965f1f to clear the attribute and retry removal. Fixes #52253. Assisted-By: GitHub Copilot (cherry picked from commit 1e93884) Co-authored-by: Charles Kerr <charles@charleskerr.com>
dsanders11
pushed a commit
that referenced
this pull request
Sep 23, 2026
fix: remove read-only files with fs.rmSync on Windows (#54180) fix: remove read-only files with fs.rmSync Electron's libc++ builds fail with EPERM for read-only files on Windows. Backport nodejs/node@2987a5965f1f to clear the attribute and retry removal. Fixes #52253. Assisted-By: GitHub Copilot (cherry picked from commit 1e93884) Co-authored-by: Charles Kerr <charles@charleskerr.com>
dsanders11
pushed a commit
that referenced
this pull request
Sep 23, 2026
fix: remove read-only files with fs.rmSync on Windows (#54180) fix: remove read-only files with fs.rmSync Electron's libc++ builds fail with EPERM for read-only files on Windows. Backport nodejs/node@2987a5965f1f to clear the attribute and retry removal. Fixes #52253. Assisted-By: GitHub Copilot (cherry picked from commit 1e93884) Co-authored-by: Charles Kerr <charles@charleskerr.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Change
A downstream test suite encountered nodejs/node#64374 while upgrading from Electron v43.6.0 to v43.7.1:
fs.rmSyncfails withEPERMwhen removing read-only files on Windows.Node's C++ implementation uses
std::filesystem, but libc++ does not clear the Windows read-only attribute before removal as MSVC STL does. Electron builds Node with libc++, exposing this difference from official Node builds.Backport nodejs/node#64453 (2987a5965f1f) to clear the attribute and retry removal, retaining the upstream regression test.
Fixes #52253.
Note: this patch doesn't let us remove
test_account_for_libc_rm_error_on_electron_linux.patch🤷♂️CC @deepak1556 as downstream stakeholder
CC @jkleinsc as this week's Node.js roll stakeholder
Checklist
npm testpassesRelease Notes
Notes: Fixed
fs.rmSyncfailing to remove read-only files on Windows.