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

Fix dot path parsing on Windows #2614

Merged
merged 1 commit into from
Apr 28, 2016
Merged

Fix dot path parsing on Windows #2614

merged 1 commit into from
Apr 28, 2016

Conversation

djdv
Copy link
Contributor

@djdv djdv commented Apr 28, 2016

Follow up to PR #2135.
When trying to add dot (current working directory) the input path was not previously standardized to forward slashes which would cause malformed directory listings like those in issue #1922.
This commit should sanitize the path in the same way it is done at other entry points in the parser and force the path to use forward slashes instead of the FS native delimiter.

Possibly related to issue #1691.

@djdv
Copy link
Contributor Author

djdv commented Apr 28, 2016

It's worth noting the same result can be achieved by simply moving fpath = filepath.ToSlash(filepath.Clean(fpath)) down below the if block instead of doing the same conversion again inside the block, however fpath is evaluated in that if, as such I'm unsure which method would be preferable.

@whyrusleeping
Copy link
Member

@djdv i think youre right on that, moving the cleanup to after the if seems like the right thing to do

@djdv
Copy link
Contributor Author

djdv commented Apr 28, 2016

@whyrusleeping
Understood, the commit has been changed and should be good.
Edit: Small newline infraction; amended.

License: MIT
Signed-off-by: Dominic Della Valle <[email protected]>
@whyrusleeping
Copy link
Member

@djdv thanks!

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.

2 participants