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>
This commit is contained in:
parent
25376c652d
commit
8b4c0decfc
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue