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

file: make Read() use and update file position #127

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tmm1
Copy link

@tmm1 tmm1 commented Apr 10, 2019

fixes #126

@tmm1
Copy link
Author

tmm1 commented Apr 10, 2019

Looks like this causes a regression because win32File is embedded inside win32Pipe, so it has no way to know if its underlying handle is an actual file or not.

--- FAIL: TestReadTimeout (0.01s)
    pipe_test.go:136: expected ErrTimeout, got illegal seek

@jstarks
Copy link
Member

jstarks commented Apr 18, 2019

Perhaps newWin32File should query the file type (GetFileType) and behave accordingly.

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.

(*win32File).Read() does not use file position
2 participants