mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-06 21:51:33 +00:00
Cleanup Daemon.verifyVolumesInfo() a bit
vols.VolumesRW has been initialized so it can't be nil. Furthermore
it's ok to read a nil map.
Signed-off-by: Zefan Li <lizefan@huawei.com>
(cherry picked from commit 8b4c0decfc)
This commit is contained in:
committed by
Jessica Frazelle
parent
6a04940f86
commit
821f9450fc
+1
-1
@@ -268,7 +268,7 @@ func (daemon *Daemon) verifyVolumesInfo(container *Container) error {
|
||||
|
||||
for destination, hostPath := range vols.Volumes {
|
||||
vfsPath := filepath.Join(daemon.root, "vfs", "dir")
|
||||
rw := vols.VolumesRW != nil && vols.VolumesRW[destination]
|
||||
rw := vols.VolumesRW[destination]
|
||||
|
||||
if strings.HasPrefix(hostPath, vfsPath) {
|
||||
id := filepath.Base(hostPath)
|
||||
|
||||
Reference in New Issue
Block a user