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

filepath.Walk does not traverse symbolic links #4759

Closed
gopherbot opened this issue Feb 5, 2013 · 2 comments
Closed

filepath.Walk does not traverse symbolic links #4759

gopherbot opened this issue Feb 5, 2013 · 2 comments
Milestone

Comments

@gopherbot
Copy link
Contributor

by aray@google.com:

Before filing a bug, please check whether it has been fixed since the
latest release. Search the issue tracker and check that you're running the
latest version of Go:

Run "go version" and compare against
http://golang.org/doc/devel/release.html  If a newer version of Go exists,
install it and retry what you did to reproduce the problem.

Thanks.

What steps will reproduce the problem?
http://play.golang.org/p/BQCIlpK_GM  demo "ls" that uses filepath.Walk
1. Try with normal directory with files (success)
2. Try on a symlink that points to the directory (failure)

What is the expected output?
Traverse the directory pointed by the symlink

What do you see instead?
No output

Which compiler are you using (5g, 6g, 8g, gccgo)?
6g

Which operating system are you using?
Linux (ubuntu)

Which version are you using?  (run 'go version')
go1.0.3

Please provide any additional information below.
@rsc
Copy link
Contributor

rsc commented Feb 5, 2013

Comment 1:

Walk does not follow symbolic links, by design. Otherwise it is difficult
to avoid loops. I will update the docs.

@rsc
Copy link
Contributor

rsc commented Feb 5, 2013

Comment 2:

This issue was closed by revision a60ffed.

Status changed to Fixed.

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants