nodejs / nodejs/node

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

未关闭
#47,098 7 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

fs
主要语言
JavaScript
星标
122k
派生
37.4k
平均合并
4 天 3 小时
30 天内合并 PR
272

描述

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.

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

在只读 Linux 文件系统上运行所链接复现仓库的 README 中的第一个测试用例,然后跟踪 Node.js 在 fs 子系统中的递归 mkdir 路径。当同一用例报告 EROFS 而不是 ENOENT 时即视为完成;根据需要检查所述的 v19.7.0 场景和 AMD64 行为。

由索引模型根据 Issue 内容生成。

评估

技术栈
javascript, linux, node.js
领域
operating-systems
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
冷清
描述清晰度
基本清楚
新手友好度
52/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。