Skip to content

Conversation

@Andyson007
Copy link

The documentation of Path::file_name(&self) says that it will return None iff it ends with ... This does not match the behavior in cases such as

  • "."
  • "/"

@rustbot
Copy link
Collaborator

rustbot commented Jan 19, 2025

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Mark-Simulacrum (or someone else) some time within the next two weeks.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jan 19, 2025
@ChrisDenton
Copy link
Member

The cases that can lead to None are, after normalization:

  • ""
  • ends with ..
  • it contains only a root dir (i.e. "/") or (on Windows) a prefix (e.g. "C:")

I say "after normalization" because ., ./., ././., etc are all normalized to the empty string.

@alex-semenyuk
Copy link
Member

Triage: comment is not addressed
@rustbot label: +S-waiting-on-author, -S-waiting-on-review

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 24, 2025
@alex-semenyuk
Copy link
Member

@Andyson007
From wg-triage. Closed this PR due to inactivity. Feel free to reopen or raised new one. Thanks for your efforts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants