layer mount: fix RO logic

Fix the logic in an anon-func looking for the `ro` option to allow for
mounting images that are set as read-only.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
This commit is contained in:
Valentin Rothberg 2020-07-13 11:13:01 +02:00
parent 3505e3818f
commit 3413af3fcd
1 changed files with 2 additions and 2 deletions

View File

@ -777,10 +777,10 @@ func (r *layerStore) Mount(id string, options drivers.MountOpts) (string, error)
hasReadOnlyOpt := func(opts []string) bool {
for _, item := range opts {
if item == "ro" {
return false
return true
}
}
return true
return false
}
// You are not allowed to mount layers from readonly stores if they