Skip to content

mkdir with the recursive flag hides EROFS readonly file system errors with ENOENT #47098

@Silic0nS0ldier

Description

@Silic0nS0ldier

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?

  1. Clone https://github.com/Silic0nS0ldier/nodejs-mkdir-recursive-hides-erofs
  2. With repo root as cwd, run commands listed in README. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    fsIssues and PRs related to the fs subsystem / file system.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions