`Path.Combine`, `HasExtension`, `GetFileName` docs still describe .NET Framework volume-separator (`:`) handling
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 86/100
- issue の種類
- ドキュメント
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- csharp
調査の方向性
xml/System.IO/Path.xml を開き、issue で名前が挙げられている Combine、HasExtension、GetFileName のオーバーロードのドキュメントを見つけます。それらの remarks と戻り値のテキストを、現在の動作および提供されている .NET Framework の例と比較します。影響を受けるすべての文言が現在の区切り文字の扱いを説明し、ボリューム区切り文字の動作を .NET Framework 固有として示していれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Type of issue
Outdated article
Description
Several docs related to System.IO.Path APIs describe special handling of the volume separator (:) that modern .NET removed in .NET Core 2.1.
Path.Combine: the remarks for Combine(string, string), Combine(string, string, string), Combine(string, string, string, string) and Combine(params string[]) say a separator is appended only if the preceding path "is not a drive reference (that is, "C:" or "D:")" and does not end in DirectorySeparatorChar, AltDirectorySeparatorChar, or VolumeSeparatorChar. On .NET Core 2.1+ only DirectorySeparatorChar/AltDirectorySeparatorChar are checked, and no drive references:
| Call | .NET 10 | .NET Framework 4.x |
|---|---|---|
Path.Combine("C:", "foo") |
C:\foo |
C:foo |
Path.Combine("C:", "foo", "bar") |
C:\foo\bar |
C:foo\bar |
Path.Combine(new[] { "C:", "foo" }) |
C:\foo |
C:foo |
The fixed-arity overloads changed in dotnet/coreclr#15579, and the params string[] overload in dotnet/coreclr#16447. Discussion in dotnet/runtime#27535 confirms that the change was intentional.
The same PR, dotnet/coreclr#16447, has adjusted behavior of several other APIs in a similar manner (removed special treatment of :), invalidating some other remarks:
HasExtension(both overloads): return value and remarks say the search stops atVolumeSeparatorChar. It no longer does:Path.HasExtension(@"C:\a.b:c")istrueon .NET 10 andfalseon .NET Framework.GetFileName(both overloads): says the result is empty when the path ends in a volume separator. Only a drive root counts now:Path.GetFileName(@"C:\file.txt:stream")returnsfile.txt:streamon .NET 10 andstreamon .NET Framework;Path.GetFileName("foo:")returnsfoo:on .NET 10 and an empty string on .NET Framework. (The string overload's remarks already list onlyDirectorySeparatorChar/AltDirectorySeparatorChar, which contradicts its own return-value text.)
Proposal: describe the modern behavior (only DirectorySeparatorChar/AltDirectorySeparatorChar are treated as separators; a drive reference such as C: is still recognized at the start of a path, but not treated specifically by the affected APIs, e.g. Path.Combine). Add notes on the volume-separator behavior being specific .NET Framework only.
Page URL
Content source URL
https://github.com/dotnet/dotnet-api-docs-temp/blob/live/xml/System.IO/Path.xml
Document Version Independent Id
fe224bbb-0eec-28fe-93e4-80a25b795e62
Platform Id
3916d1a3-5b50-d6c3-65d1-d12ac54cc834
Article author
@dotnet-bot
- 主要言語
- C#
- スター
- 954
- フォーク
- 1.7k
- 平均マージ
- 1日 4時間
- マージ済み PR(30日)
- 50
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
dotnet/dotnet-api-docs のほかの issue
-
untriaged
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
dotnet/dotnet-api-docs#13122 ·
メンテナーはふだん 1 日以内に返信
-
UnscopedRefAttribute article displaying xml tags対応中かも @gewarren が 5 日前に担当しました。 オープン:pushpin: seQUESTered untriaged
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
dotnet/dotnet-api-docs#13095 · リアクション 2 件 · 担当者 2 名 ·
メンテナーはふだん 1 日以内に返信
-
area-System.Threading untriaged
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
dotnet/dotnet-api-docs#13091 ·
メンテナーはふだん 1 日以内に返信
-
untriaged
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
dotnet/dotnet-api-docs#13039 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
DisplayAttribute string properties: Remarks incorrectly state the property performs resource lookupオープンarea-System.ComponentModel.DataAnnotations untriaged
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
dotnet/dotnet-api-docs#13023 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
dotnet/dotnet-api-docs の issue をすべて見る
似ている issue
-
Money ExploitsオープンS: Untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
project-wayfarer/wayfarer-14#1628 ·
メンテナーはふだん 3 日以内に返信
-
:watch: Not Triaged dotnet-target-version
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
copilot documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 2 日以内に返信
-
agentic-workflows
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
microsoft/PowerPlatformConnectors#4320 ·
メンテナーはふだん 4 日以内に返信