-
Notifications
You must be signed in to change notification settings - Fork 94
Replace backslashes in file path names. #87
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
Conversation
8907e73
to
abf5aa0
Compare
go/porcelain/deploy.go
Outdated
if err != nil { | ||
return err | ||
} | ||
rel := cleanFileName(osRel) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you could use filepath.Clean
https://golang.org/pkg/path/filepath/#Clean
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rybit That will not do what we want. We want to replace filepath.Separator
with /
always.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to change the function name, it's misleading.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, because on windows, separator = \
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That means that for any windows machine, this will force /
not \
? If you guys say that is right then ok! You've got more context than me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is precisely the bug we are trying to fix! netlify/netlifyctl#109
Fixes issues not deploying files under the right paths using Windows. Signed-off-by: David Calavera <[email protected]>
abf5aa0
to
a524e51
Compare
Fixes issues not deploying files under the right paths using Windows.
Fixes #86
Signed-off-by: David Calavera [email protected]