-
Notifications
You must be signed in to change notification settings - Fork 13.9k
Closed
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.O-windowsOperating system: WindowsOperating system: WindowsT-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.O-windowsOperating system: WindowsOperating system: WindowsT-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
nagisa commentedon Nov 10, 2019
Case sensitivity is a property of the filesystem, not operating system and these functions are filesystem agnostic.
As thus, this issue is not actionable. Closing. If you feel differently please complain and I’ll reopen.
Arnavion commentedon Jul 30, 2020
It's fine if the functions want to be case-sensitive, but their docs need to be changed to point this out explicitly and noticeably. Every Windows user is going to assume that the functions are case-insensitive just like they are in other languages on the platform. (I imagine OSX users will have the same expectation?)
It's made slightly worse because
PrefixComponent
is handled in a special way that makesPath::new("C:\\Windows").starts_with(Path::new("c:"))
evaluate totrue
despite the mismatched case. So someone using that as a quick test of their assumption would end up with the wrong idea.@nagisa Would you mind reopening for this reason?
retep998 commentedon Jul 30, 2020
I think it would also be good to have a crate like
same-file
provide astarts_with
that does hit the filesystem. Such an API would also be able to detect when the same folder is specified but using alternate prefixes or mount points or through symbolic links.ChrisDenton commentedon Sep 11, 2020
The driver letter is a symlink in the Object Manager and lookup is always case-insensitive. Folders are located on the filesystem and may or may not be case sensitive.
I do think platform specific behaviour should be documented if it can be a source of confusion.
Rollup merge of rust-lang#91464 - ChrisDenton:doc-path-case-sensitivi…