diff --git a/daemon/container.go b/daemon/container.go index a8875725c..35586532c 100644 --- a/daemon/container.go +++ b/daemon/container.go @@ -599,11 +599,12 @@ func (container *Container) Copy(resource string) (io.ReadCloser, error) { return nil, err } for _, m := range mounts { - dest, err := container.GetResourcePath(m.Destination) + var dest string + dest, err = container.GetResourcePath(m.Destination) if err != nil { return nil, err } - if err := mount.Mount(m.Source, dest, "bind", "rbind,ro"); err != nil { + if err = mount.Mount(m.Source, dest, "bind", "rbind,ro"); err != nil { return nil, err } }