Make tar creation more crossplatform by adding files always with forward slash path separators
This commit is contained in:
@@ -122,7 +122,7 @@ func CreateTarGzStream(ctx context.Context, filepaths []string) io.ReadCloser {
|
|||||||
}
|
}
|
||||||
|
|
||||||
header.Format = tar.FormatGNU
|
header.Format = tar.FormatGNU
|
||||||
header.Name = strings.TrimPrefix(filepath.Clean(fpath), string(filepath.Separator))
|
header.Name = strings.TrimPrefix(filepath.ToSlash(filepath.Clean(fpath)), "/")
|
||||||
|
|
||||||
mode := st.Mode()
|
mode := st.Mode()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user