Merge pull request #39752 from vikramhh/39695-fix

Fixups for 39695 - edit comments, redundant asserts
This commit is contained in:
Yong Tang 2019-08-17 12:53:42 -07:00 committed by GitHub
commit 4760db0402
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View file

@ -559,7 +559,10 @@ func copyFile(archiver Archiver, source, dest *copyEndpoint, identity *idtools.I
// Normal containers
if identity == nil {
// Use system.MkdirAll here, which is a custom version of os.MkdirAll
// modified for use on Windows to handle volume GUID paths (\\?\{dae8d3ac-b9a1-11e9-88eb-e8554b2ba1db}\path\)
// modified for use on Windows to handle volume GUID paths. These paths
// are of the form \\?\Volume{<GUID>}\<path>. An example would be:
// \\?\Volume{dae8d3ac-b9a1-11e9-88eb-e8554b2ba1db}\bin\busybox.exe
if err := system.MkdirAll(filepath.Dir(dest.path), 0755, ""); err != nil {
return err
}

View file

@ -170,7 +170,6 @@ func TestBuildMultiStageCopy(t *testing.T) {
assert.NilError(t, err)
out := bytes.NewBuffer(nil)
assert.NilError(t, err)
_, err = io.Copy(out, resp.Body)
_ = resp.Body.Close()
if err != nil {
@ -604,7 +603,6 @@ func TestBuildPreserveOwnership(t *testing.T) {
assert.NilError(t, err)
out := bytes.NewBuffer(nil)
assert.NilError(t, err)
_, err = io.Copy(out, resp.Body)
_ = resp.Body.Close()
if err != nil {