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

os: Cannot list directory twice with the same File #5671

Closed
titanous opened this issue Jun 9, 2013 · 2 comments
Closed

os: Cannot list directory twice with the same File #5671

titanous opened this issue Jun 9, 2013 · 2 comments

Comments

@titanous
Copy link
Member

@titanous titanous commented Jun 9, 2013

What steps will reproduce the problem?

http://play.golang.org/p/yti7xDJCCX

What is the expected output?

[main.go] <nil>
[main.go] <nil>

What do you see instead?

[main.go] <nil>
[] <nil>

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

6g

Which operating system are you using?

OS X and Linux

Which version are you using?  (run 'go version')

go version go1.1 darwin/amd64

Please provide any additional information below.

The same issue occurs when calling File.Readdir more than once or combining calls of
File.Readdirnames and File.Readdir.
@kisielk

This comment has been minimized.

Copy link
Contributor

@kisielk kisielk commented Jun 9, 2013

Comment 1:

Add a dir.Seek(0, 0) in between the calls to Readdirnames.
@minux

This comment has been minimized.

Copy link
Member

@minux minux commented Jun 9, 2013

Comment 2:

Status changed to WorkingAsIntended.

@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.