René's URL Explorer Experiment


Title: fs: do not treat EPERM as ENOTEMPTY on Windows by PickBas · Pull Request #63709 · nodejs/node · GitHub

Open Graph Title: fs: do not treat EPERM as ENOTEMPTY on Windows by PickBas · Pull Request #63709 · nodejs/node

X Title: fs: do not treat EPERM as ENOTEMPTY on Windows by PickBas · Pull Request #63709 · nodejs/node

Description: Changes fs.rm(..., { recursive: true }) on Windows treats EPERM from rmdir as "directory not empty" and recurses into children. That's wrong, because on Windows, EPERM means "no permission to delete", not "still has contents". Windows now uses its own notEmptyErrorCodes set that excludes EPERM. Safety The EPERM treatment as non-empty traces to rimraf 2.2: (changelog, commit): As per http://sourceforge.net/mailarchive/message.php?msg_id=31240176 sshfs-mounted directories return EPERM on rmdir called with non-empty dir. Hence removing non-empty directories mounted through sshfs didn't work with rimraf, and this change makes it work. This does not apply to Windows, so EPERM is safely removed from notEmptyErrorCodes and is kept for other platforms. Before/After JS Script used as rm.js: import { rmSync } from "fs"; import { rm } from "fs/promises"; const parentPath = "C:\\Users\\dev\\permissions\\folders"; await rm(parentPath, {recursive: true}); Before PS C:\Users\dev\permissions> node.exe --max-old-space-size=30 .\rm.js <--- Last few GCs ---> .6[25312:000001C3A99BC000] 515 ms: Mark-Compact 24.7 (87.4) -> 23.3 (89.4) MB, pooled: 0 MB, 2.46 / 0.00 ms (+ 1.4 ms in 71 steps since start of marking, biggest step 0.1 ms, walltime since start of marking 9 ms) (average mu = 0.736, current mu = 0.70[25312:000001C3A99BC000] 592 ms: Mark-Compact 38.7 (89.4) -> 30.8 (96.4) MB, pooled: 0 MB, 10.28 / 0.00 ms (+ 0.8 ms in 66 steps since start of marking, biggest step 0.2 ms, walltime since start of marking 20 ms) (average mu = 0.833, current mu = 0. FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory After PS C:\Users\dev\permissions> ..\node_projects\node\Release\node.exe --max-old-space-size=30 .\rm.js node:internal/modules/run_main:107 triggerUncaughtException( ^ [Error: EPERM: operation not permitted, rmdir 'C:\Users\kirill\dev\permissions\folders\00'] { errno: -4048, code: 'EPERM', syscall: 'rmdir', path: 'C:\\Users\\dev\\permissions\\folders\\00' } Node.js v27.0.0-pre Fixes: #56433

Open Graph Description: Changes fs.rm(..., { recursive: true }) on Windows treats EPERM from rmdir as "directory not empty" and recurses into children. That's wrong, because on Windows, EPERM means "no ...

X Description: Changes fs.rm(..., { recursive: true }) on Windows treats EPERM from rmdir as &quot;directory not empty&quot; and recurses into children. That&#39;s wrong, because on Windows, EPERM mea...

Opengraph URL: https://github.com/nodejs/node/pull/63709

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:ff9c4e80-55f7-8050-f4f0-2334a4b2be1c
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idE35E:2F0FC4:64CB7B:8895E5:6A4C7CE1
html-safe-nonce9349bdd5f3113d44323e3ccb4a90495da12dc7cedf65cfc1cff741b258e08402
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMzVFOjJGMEZDNDo2NENCN0I6ODg5NUU1OjZBNEM3Q0UxIiwidmlzaXRvcl9pZCI6IjU2MzgzNjA1Njg5MjQyNDExMjEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacaa742f53ee3f9ce135a140f13df1b9b00ca3d24842f7eb74a515cbfd3daf2398
hovercard-subject-tagpull_request:3787715580
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/nodejs/node/pull/63709/files
twitter:imagehttps://avatars.githubusercontent.com/u/38224153?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/38224153?s=400&v=4
og:image:altChanges fs.rm(..., { recursive: true }) on Windows treats EPERM from rmdir as "directory not empty" and recurses into children. That's wrong, because on Windows, EPERM means "no ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None3d11bb817438277de2a940854450e83a7d32b6aeb5014e9e6b00a6423900251c
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/nodejs/node git https://github.com/nodejs/node.git
octolytics-dimension-user_id9950313
octolytics-dimension-user_loginnodejs
octolytics-dimension-repository_id27193779
octolytics-dimension-repository_nwonodejs/node
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id27193779
octolytics-dimension-repository_network_root_nwonodejs/node
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasecd470457e909b9d062f8002cf438ba870e6acff6
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/nodejs/node/pull/63709/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fpull%2F63709%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fpull%2F63709%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=nodejs%2Fnode
Reloadhttps://github.com/nodejs/node/pull/63709/files
Reloadhttps://github.com/nodejs/node/pull/63709/files
Reloadhttps://github.com/nodejs/node/pull/63709/files
Please reload this pagehttps://github.com/nodejs/node/pull/63709/files
nodejs https://github.com/nodejs
nodehttps://github.com/nodejs/node
Please reload this pagehttps://github.com/nodejs/node/pull/63709/files
Notifications https://github.com/login?return_to=%2Fnodejs%2Fnode
Fork 36k https://github.com/login?return_to=%2Fnodejs%2Fnode
Star 118k https://github.com/login?return_to=%2Fnodejs%2Fnode
Code https://github.com/nodejs/node
Issues 1.4k https://github.com/nodejs/node/issues
Pull requests 964 https://github.com/nodejs/node/pulls
Actions https://github.com/nodejs/node/actions
Projects https://github.com/nodejs/node/projects
Security and quality 0 https://github.com/nodejs/node/security
Insights https://github.com/nodejs/node/pulse
Code https://github.com/nodejs/node
Issues https://github.com/nodejs/node/issues
Pull requests https://github.com/nodejs/node/pulls
Actions https://github.com/nodejs/node/actions
Projects https://github.com/nodejs/node/projects
Security and quality https://github.com/nodejs/node/security
Insights https://github.com/nodejs/node/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fnodejs%2Fnode%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fnodejs%2Fnode%2Fissues%2Fnew%2Fchoose
nodejs-github-bothttps://github.com/nodejs-github-bot
nodejs:mainhttps://github.com/nodejs/node/tree/main
JaneaSystems:fs-rm-permissions-winhttps://github.com/JaneaSystems/node/tree/fs-rm-permissions-win
Conversation 8 https://github.com/nodejs/node/pull/63709
Commits 1 https://github.com/nodejs/node/pull/63709/commits
Checks 37 https://github.com/nodejs/node/pull/63709/checks
Files changed 2 https://github.com/nodejs/node/pull/63709/files
fs: do not treat EPERM as ENOTEMPTY on Windows https://github.com/nodejs/node/pull/63709/files#top
Show all changes 1 commit https://github.com/nodejs/node/pull/63709/files
557aa0e fs: do not treat EPERM as ENOTEMPTY on Windows PickBas May 29, 2026 https://github.com/nodejs/node/pull/63709/commits/557aa0ebf7a29c1b4767cab82ee3976db5a5fa01
Clear filters https://github.com/nodejs/node/pull/63709/files
Please reload this pagehttps://github.com/nodejs/node/pull/63709/files
Please reload this pagehttps://github.com/nodejs/node/pull/63709/files
rimraf.js https://github.com/nodejs/node/pull/63709/files#diff-102db77122b5d23f42d497abfc7d626e60723d911caa6293fd16a5ec92b0d653
test-fs-rm.js https://github.com/nodejs/node/pull/63709/files#diff-596c3dc1f2c2b0c3dc8f6c087b9e0f1910188ff28eaee22800367acc0e9a4f43
lib/internal/fs/rimraf.jshttps://github.com/nodejs/node/pull/63709/files#diff-102db77122b5d23f42d497abfc7d626e60723d911caa6293fd16a5ec92b0d653
View file https://github.com/JaneaSystems/node/blob/557aa0ebf7a29c1b4767cab82ee3976db5a5fa01/lib/internal/fs/rimraf.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/nodejs/node/pull/63709/{{ revealButtonHref }}
https://github.com/nodejs/node/pull/63709/files#diff-102db77122b5d23f42d497abfc7d626e60723d911caa6293fd16a5ec92b0d653
https://github.com/nodejs/node/pull/63709/files#diff-102db77122b5d23f42d497abfc7d626e60723d911caa6293fd16a5ec92b0d653
test/parallel/test-fs-rm.jshttps://github.com/nodejs/node/pull/63709/files#diff-596c3dc1f2c2b0c3dc8f6c087b9e0f1910188ff28eaee22800367acc0e9a4f43
View file https://github.com/JaneaSystems/node/blob/557aa0ebf7a29c1b4767cab82ee3976db5a5fa01/test/parallel/test-fs-rm.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/nodejs/node/pull/63709/{{ revealButtonHref }}
https://github.com/nodejs/node/pull/63709/files#diff-596c3dc1f2c2b0c3dc8f6c087b9e0f1910188ff28eaee22800367acc0e9a4f43
Please reload this pagehttps://github.com/nodejs/node/pull/63709/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.