-
Notifications
You must be signed in to change notification settings - Fork 69
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
walk EOF error on Windows #70
Comments
powersj
added a commit
to powersj/godirwalk
that referenced
this issue
Jan 31, 2023
In karrick#68, the scanner now returns any error that was encountered. On Windows, the call to Readdir will return an EOF when it is done reading a directory. I believe the desired behavior is to throw an error on any actual errors, but in the case of EOF, continue on to the next directory. As such, check for the EOF and return no error while releasing resources. fixes: karrick#70
move to trash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary
It appears that v1.17.0 caused an EOF error to get returned from the
Walk
function on Windows platforms.This was reported to Telegraf in influxdata/telegraf#11823 as updating the godirwalk library seemed to break Windows users.
Reproducer
Use the walk-fast example:
This same behavior does not happen on Linux:
System Info
Windows 10: go1.19.3 linux/amd64
Linux (Arch): go1.19.3 linux/amd64
The text was updated successfully, but these errors were encountered: