mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Fixups for 39695 - edit comments, redundant lines
1. Modify comments added in 5858a99267
Windows Volume GUID path format is: \\?\Volume{<GUID Value>}\<path>
Rewrote the example given in comments to conform to the format..
2. Remove two redundant asserts[assert.NilError]. They are redundant
because the last statement will not change the value of err.
Signed-off-by: Vikram bir Singh <vikrambir.singh@docker.com>
This commit is contained in:
parent
934cae7962
commit
b146b2382c
2 changed files with 4 additions and 3 deletions
|
@ -559,7 +559,10 @@ func copyFile(archiver Archiver, source, dest *copyEndpoint, identity *idtools.I
|
||||||
// Normal containers
|
// Normal containers
|
||||||
if identity == nil {
|
if identity == nil {
|
||||||
// Use system.MkdirAll here, which is a custom version of os.MkdirAll
|
// 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 {
|
if err := system.MkdirAll(filepath.Dir(dest.path), 0755, ""); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
|
@ -170,7 +170,6 @@ func TestBuildMultiStageCopy(t *testing.T) {
|
||||||
assert.NilError(t, err)
|
assert.NilError(t, err)
|
||||||
|
|
||||||
out := bytes.NewBuffer(nil)
|
out := bytes.NewBuffer(nil)
|
||||||
assert.NilError(t, err)
|
|
||||||
_, err = io.Copy(out, resp.Body)
|
_, err = io.Copy(out, resp.Body)
|
||||||
_ = resp.Body.Close()
|
_ = resp.Body.Close()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -604,7 +603,6 @@ func TestBuildPreserveOwnership(t *testing.T) {
|
||||||
assert.NilError(t, err)
|
assert.NilError(t, err)
|
||||||
|
|
||||||
out := bytes.NewBuffer(nil)
|
out := bytes.NewBuffer(nil)
|
||||||
assert.NilError(t, err)
|
|
||||||
_, err = io.Copy(out, resp.Body)
|
_, err = io.Copy(out, resp.Body)
|
||||||
_ = resp.Body.Close()
|
_ = resp.Body.Close()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue