Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a WIP attempt to address issue #13. It moves some of the common code in walk() into a helper func, which is then put into os specific build files. The approach it takes is to remove the code that was introduced to fix a windows problem with Stat() symlinks on Windows (but which caused problems with proper path handling on Unix). On Unix it simply does the Stat() on the symlink, and on Windows is first uses EvalSymlinks() to turn the path into one without symlinks, before Stat()ing.
This needs further testing, particularly on Windows, so if anyone could help with that and provide feedback, please let me know.
Factoring out the common code has an additional benefit of making the walk() func shorter and a bit more straightforward, although the current helper adds a little complication in having to return both an error and a bool (to choose between return and continue by the helper users).
The first commit is a test which will fail if the remaining commits are not present, so testing the failing behavior can be done by checking out just the test commit.