-
-
Notifications
You must be signed in to change notification settings - Fork 15k
Documentation for std::fs::set_permissions doesn't cover symlink behavior #75942
Copy link
Copy link
Closed
Closed
Copy link
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-bugCategory: This is a bug.Category: This is a bug.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API 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-bugCategory: This is a bug.Category: This is a bug.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
The documentation for
std::fs::set_permissionsdoesn't say what it does if the given path names a symlink.Experimentally, it seems that on Unix-family platforms it follows symlinks, while on Windows it does not. Though surprising, it's likely just a result of using the
chmodandSetFileAttributesfunctions on their respective platform. The documentation does say that use of those functions isn't guaranteed, so it'd be useful to document what guarantees are intended, if any.