mirror of https://github.com/knative/func.git
Fix symlink path separators (#2535)
When running on Windows the path separators in symlink target is backslash. This must be fixed up when uploading source code into docker daemon or into cluster volume. Signed-off-by: Matej Vašek <matejvasek@gmail.com>
This commit is contained in:
parent
59aa11c4dd
commit
e2621f6637
|
@ -295,7 +295,7 @@ func (b *Builder) Build(ctx context.Context, f fn.Function, platforms []fn.Platf
|
|||
}
|
||||
}
|
||||
|
||||
hdr, err := tar.FileInfoHeader(fi, lnk)
|
||||
hdr, err := tar.FileInfoHeader(fi, filepath.ToSlash(lnk))
|
||||
if err != nil {
|
||||
return fmt.Errorf("cannot create tar header: %w", err)
|
||||
}
|
||||
|
|
|
@ -336,7 +336,7 @@ func sourcesAsTarStream(f fn.Function) *io.PipeReader {
|
|||
}
|
||||
}
|
||||
|
||||
hdr, err := tar.FileInfoHeader(fi, lnk)
|
||||
hdr, err := tar.FileInfoHeader(fi, filepath.ToSlash(lnk))
|
||||
if err != nil {
|
||||
return fmt.Errorf("cannot create a tar header: %w", err)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue