-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.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.
Description
Until September, PermissionsExt::mode
on unix returned the permissions of the file masked with 0o777
, which was hiding the set{u,g}id/sticky bits. Then, #44147 and #44624 changed the standard library to avoid masking the permissions at all.
The fix indeed exposed the missing bits, but it also exposed some extra ones, like the ones specifying if the node is a file or a directory. For example, now the permissions of a directory are like 0o40755
.
I think those bits are out of place in the permissions, as the information is provided by the Metadata
struct already. Can we revert to masking with 0o7777
to preserve the set{u,g}id/sticky but discard the extra ones?
Metadata
Metadata
Assignees
Labels
C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.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.