`mkdir` with the `recursive` flag hides `EROFS` readonly file system errors with `ENOENT`
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 122k
- Forks
- 37.3k
- Avg merge
- 4d 2h
- Merged PRs (30d)
- 283
Description
Version
v19.7.0
Platform
Linux 0a51b4117477 5.15.49-linuxkit #1 SMP PREEMPT Tue Sep 13 07:51:32 UTC 2022 aarch64 Linux
Subsystem
fs
What steps will reproduce the bug?
- Clone https://github.com/Silic0nS0ldier/nodejs-mkdir-recursive-hides-erofs
- With repo root as
cwd, run commands listed inREADME. Reported issue is first test case.
How often does it reproduce? Is there a required condition?
Provided the target of mkdir is a read only filesystem and the directory does not already exist, this issue reproduces 100% of the time.
What is the expected behavior? Why is that the expected behavior?
An error with the error code EROFS.
What do you see instead?
An error with the error code ENOENT.
Additional information
On AMD64 systems the digest will need to be re-acquired, as this reproduction was created on an ARM64 host.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Run the first test case from the linked reproduction repository's README on a Linux read-only filesystem, then trace Node.js's recursive mkdir path in the fs subsystem. Done means the same case reports EROFS rather than ENOENT; check the stated v19.7.0 scenario and AMD64 behavior as needed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, linux, node.js
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100