Lines 343-349
func RebaseArchiveEntries(srcContent io.Reader, oldBas
Link Here
|
343 |
// "archive/tar: cannot encode header: Format specifies USTAR; and USTAR cannot encode Name=...". |
343 |
// "archive/tar: cannot encode header: Format specifies USTAR; and USTAR cannot encode Name=...". |
344 |
// |
344 |
// |
345 |
// To fix, set the format to PAX here. See docker/for-linux issue #484. |
345 |
// To fix, set the format to PAX here. See docker/for-linux issue #484. |
346 |
hdr.Format = tar.FormatPAX |
346 |
hdr.Format = tar.FormatGNU |
347 |
hdr.Name = strings.Replace(hdr.Name, oldBase, newBase, 1) |
347 |
hdr.Name = strings.Replace(hdr.Name, oldBase, newBase, 1) |
348 |
if hdr.Typeflag == tar.TypeLink { |
348 |
if hdr.Typeflag == tar.TypeLink { |
349 |
hdr.Linkname = strings.Replace(hdr.Linkname, oldBase, newBase, 1) |
349 |
hdr.Linkname = strings.Replace(hdr.Linkname, oldBase, newBase, 1) |