Skip to content
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

Make stat actually recognize symlinks #1480

Merged
merged 1 commit into from
Dec 1, 2023
Merged

Make stat actually recognize symlinks #1480

merged 1 commit into from
Dec 1, 2023

Conversation

ag-eitilt
Copy link
Collaborator

Whose bright idea was it to make the syscall you use to check the type of a path, not actually check the type of all paths, and instead hide the uniform behaviour behind a one-letter difference?

Regardless, the stat function was previously returning PathTypeRegularFile (and permissions/size of the target file) when called on symlinks. It now returns PathTypeSymlink (and less helpful but more accurate permissions/size).

Copy link
Contributor

@JakeSiFive JakeSiFive left a comment

Choose a reason for hiding this comment

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

Dope 🤦

Thanks for fixing this @ag-eitilt

@ag-eitilt ag-eitilt merged commit e5b4248 into master Dec 1, 2023
12 checks passed
@ag-eitilt ag-eitilt deleted the stat-symlinks branch December 1, 2023 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants