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

Can't handle paths longer than PATH_MAX #38

Open
tavianator opened this issue Jul 9, 2017 · 2 comments
Open

Can't handle paths longer than PATH_MAX #38

tavianator opened this issue Jul 9, 2017 · 2 comments

Comments

@tavianator
Copy link
Contributor

tavianator commented Jul 9, 2017

POSIX says

The find utility shall be able to descend to arbitrary depths in a file hierarchy and shall not fail due to path length limitations (unless a path operand specified by the application exceeds {PATH_MAX} requirements).

but

$ name="0123456789ABCDEF"
$ name="${name}${name}${name}${name}"
$ name="${name}${name}${name}${name}"
$ name="${name:0:255}"
$ (mkdir deep && cd deep && for i in {1..17}; do mkdir $name && cd $name; done)
$ ./target/debug/find deep -mindepth 17
Error: deep: other os error
$ find deep -mindepth 17
deep/0123456789ABCDEF0123456789ABCDEF...

Also, despite printing an error message, uutils' find exits with status 0.

@tavianator
Copy link
Contributor Author

Probably related to BurntSushi/walkdir#23

@helgaros
Copy link

try long path tool program,may be helpful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants