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

ls: On Windows use metadata owned by DirEntry instead of retrieved one additionaly #2858

Merged
merged 1 commit into from
Jan 9, 2022

Conversation

moko256
Copy link
Contributor

@moko256 moko256 commented Jan 9, 2022

This PR will make is_hidden to use the Metadata that DirEntry has instead of retrieved with std::fs::metadata and std::fs::symlink_metadata.

With this change, the Application Data folder, that is symlink to hidden folder, will be hidden, that will same as dir behavior in cmd.

Also, coreutils ls C:\ will not panic. (it is probably issue in std::fs, but I came up with this PR when I was reproducing it.)

The test from #1662 and #2441 should pass.

@sylvestre
Copy link
Sponsor Contributor

Could you please add a unit test to cover this ? thanks
(ls c:\ and the other)
thanks

@moko256 moko256 force-pushed the moko256_ls_metadata_in_is_hidden branch from ebbde34 to 5659bf8 Compare January 9, 2022 17:56
@moko256
Copy link
Contributor Author

moko256 commented Jan 9, 2022

Done, I added test for C:\ and hidden link.

@sylvestre
Copy link
Sponsor Contributor

thanks!

@sylvestre sylvestre merged commit c69380a into uutils:master Jan 9, 2022
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.

None yet

2 participants