-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
pkg/bindings/images.nTar(): slashify hdr.Name values #11260
pkg/bindings/images.nTar(): slashify hdr.Name values #11260
Conversation
1386f73
to
86779b9
Compare
86779b9
to
686bd64
Compare
When setting path names in the build context archive, convert path names to use forward slashes, as is normal for those archives, so that directory hierarchies archived on Windows hosts extract correctly everywhere. Not really sure how to run the remote client in CI on a system that uses `\` as a path separator, which is where this error crops up, so [NO TESTS NEEDED] Signed-off-by: Nalin Dahyabhai <[email protected]>
686bd64
to
aeffdb0
Compare
Neat change @nalind |
@@ -481,9 +481,9 @@ func nTar(excludes []string, sources ...string) (io.ReadCloser, error) { | |||
return nil // skip root dir | |||
} | |||
|
|||
name := strings.TrimPrefix(path, s+string(filepath.Separator)) | |||
name := filepath.ToSlash(strings.TrimPrefix(path, s+string(filepath.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.
What exactly is changing here? I am not seeing it?
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.
AIUI filepath.ToSlash(), when run on Windows, will have separator
set to backslash and will convert those to normal slashes.
@vrothberg @giuseppe PTAL |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: nalind, rhatdan The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/hold |
I accidentally approved this one. I fail to see any change in this code, other then rearranging it a bit. Maybe I am missing it. |
Oops, it merged, I guess I was too slow. Not that it matters, but I am still unsure this fixes the issue. |
When setting path names in the build context archive, convert path names to use forward slashes, as is normal for those archives, so that directory hierarchies archived on Windows hosts extract correctly everywhere.
Fixes #11259