mv: wrong reason when the source can't be stat'ed (missing 'x/' says Not a directory, EACCES says No such file)
メンテナーはふだん 1 日以内に返信
評価
調査の方向性
mv の実装にある rename() の経路から始めます。issue によると、ここではソースの symlink_metadata() エラーが破棄されています。そのエラーがどのように診断メッセージになるかをたどり、その後、関連する mv のテストを実行するか、末尾にスラッシュが付いた存在しないソースと読み取り不能なパスのケースを追加します。両方のケースで対応する理由が報告され、終了コード 1 が維持されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
mv reports the wrong reason when it can't stat the source.
$ touch f; mkdir d; touch d/x; chmod 000 d
$ mv missing/ g # GNU 9.7 / 9.12
mv: cannot stat 'missing/': No such file or directory
$ uu-mv missing/ g # uutils main
mv: cannot stat 'missing/': Not a directory
$ mv d/x g # GNU
mv: cannot stat 'd/x': Permission denied
$ uu-mv d/x g # uutils main
mv: cannot stat 'd/x': No such file or directory
Exit codes match (1); only the message is wrong. In rename() the source symlink_metadata() error is thrown away: a trailing slash always becomes "Not a directory" and anything else becomes "No such file or directory".
Found with behave, comparing GNU coreutils and uutils on trailing-slash and unreadable-path inputs.
- 主要言語
- Rust
- スター
- 24.3k
- フォーク
- 2.2k
- 平均マージ
- 2日 5時間
- マージ済み PR(30日)
- 387
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
uutils/coreutils のほかの issue
-
pr: -o/--indent does not pad the header line対応中かも @emirmrkaljevic が 1 日前に担当しました。 オープンU - pr
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
メンテナーはふだん 1 日以内に返信
-
realpath: empty operand aborts with a garbled error instead of being reported as missing対応中かも @emirmrkaljevic が 2 日前に担当しました。 オープンU - realpath
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 半日 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
nl: section delimiters reset --join-blank-lines grouping対応中かも @coracoracora が 3 日前に担当しました。 オープンU - nl
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
uutils/coreutils#16130 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
uniq: overflowing -f/-s/-w values with trailing garbage are silently accepted対応中かも @huuan26 が 4 日前に担当しました。 オープンU - uniq
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
uutils/coreutils の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
pop-os/cosmic-applets#1619 ·
メンテナーはふだん 3 日以内に返信
-
binding:python bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
coollabsio/orbit#72 ·
メンテナーはふだん 1 日以内に返信
-
swc_common: Mark::least_ancestor never returns when the answer is the root mark (ANT-2026-JYDQGGRT)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
swc-project/swc-ai-issues#137 ·
-
Synth suite fails unless run from the repo root: signal_flow's default machine path is cwd-relativeオープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
Nimblesite/osprey#370 ·
メンテナーはふだん 1 日以内に返信