diff options
author | zhangguanzhang <zhangguanzhang@qq.com> | 2020-09-23 13:21:23 +0800 |
---|---|---|
committer | zhangguanzhang <zhangguanzhang@qq.com> | 2020-09-24 08:54:46 +0800 |
commit | 873989f7a413ee8acc5e137577dfaa4d38f94fbd (patch) | |
tree | 285203d9e0e799327145c9ca3975f81a8cd42971 /pkg/api/handlers | |
parent | 5cedd830f7275e8dc3382502908b846bfa57a3b8 (diff) | |
download | podman-873989f7a413ee8acc5e137577dfaa4d38f94fbd.tar.gz podman-873989f7a413ee8acc5e137577dfaa4d38f94fbd.tar.bz2 podman-873989f7a413ee8acc5e137577dfaa4d38f94fbd.zip |
apiv2 container limit differ from docker-api
Signed-off-by: zhangguanzhang <zhangguanzhang@qq.com>
Diffstat (limited to 'pkg/api/handlers')
-rw-r--r-- | pkg/api/handlers/compat/containers.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/api/handlers/compat/containers.go b/pkg/api/handlers/compat/containers.go index 1c2356b92..63c44eaef 100644 --- a/pkg/api/handlers/compat/containers.go +++ b/pkg/api/handlers/compat/containers.go @@ -85,7 +85,7 @@ func ListContainers(w http.ResponseWriter, r *http.Request) { utils.InternalServerError(w, err) return } - if _, found := r.URL.Query()["limit"]; found && query.Limit != -1 { + if _, found := r.URL.Query()["limit"]; found && query.Limit > 0 { last := query.Limit if len(containers) > last { containers = containers[len(containers)-last:] |