Skip to content

doc(std): fix typo lchown -> lchmod #140595

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 3, 2025

Conversation

lolbinarycat
Copy link
Contributor

@lolbinarycat lolbinarycat commented May 2, 2025

chown is irrelevant here, as this function does not affect file ownership. chmod is the correct function to reference here.

@rustbot
Copy link
Collaborator

rustbot commented May 2, 2025

r? @workingjubilee

rustbot has assigned @workingjubilee.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@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 May 2, 2025
@@ -2994,7 +2994,7 @@ pub fn read_dir<P: AsRef<Path>>(path: P) -> io::Result<ReadDir> {
/// When possible, permissions should be set at creation time instead.
///
/// # Rationale
/// POSIX does not specify an `lchown` function,
/// POSIX does not specify an `lchmod` function,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's an especially ironic typo because POSIX does specify lchown. :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://pubs.opengroup.org/onlinepubs/000095399/functions/lchown.html
The lchown() function shall be equivalent to chown(), except in the case where the named file is a symbolic link. In this case, lchown() shall change the ownership of the symbolic link file itself, while chown() changes the ownership of the file or directory to which the symbolic link refers.

huh

@cuviper
Copy link
Member

cuviper commented May 2, 2025

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented May 2, 2025

📌 Commit b7c933a has been approved by cuviper

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 2, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request May 3, 2025
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#138712 (resolve: Support imports of associated types and glob imports from traits)
 - rust-lang#140395 (organize and extend forbidden target feature tests)
 - rust-lang#140576 (Remove fragile equal-pointers-unequal tests.)
 - rust-lang#140582 (Update sysinfo to `0.35.0` in bootstrap and `tools/opt-dist`)
 - rust-lang#140595 (doc(std): fix typo lchown -> lchmod)
 - rust-lang#140597 (zkvm: remove schmerik as target maintainer)
 - rust-lang#140604 (yet another small borrowck cleanup )

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 2820bdb into rust-lang:master May 3, 2025
6 checks passed
@rustbot rustbot added this to the 1.88.0 milestone May 3, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request May 3, 2025
Rollup merge of rust-lang#140595 - lolbinarycat:std-set_permissions-typo, r=cuviper

doc(std): fix typo lchown -> lchmod

chown is irrelevant here, as this function does not affect file ownership.  chmod is the correct function to reference here.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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