diff options
author | zhangguanzhang <zhangguanzhang@qq.com> | 2020-09-23 13:21:23 +0800 |
---|---|---|
committer | Matthew Heon <mheon@redhat.com> | 2020-09-25 11:08:27 -0400 |
commit | 0b8456b44cfe0fb82e293df227a43070677f15f7 (patch) | |
tree | 6112ceb97d2d303a7dd21579677dee5e8d78ad42 /pkg | |
parent | 3be6c483c6d7ca36d16f0b312bc8c897160ab7a0 (diff) | |
download | podman-0b8456b44cfe0fb82e293df227a43070677f15f7.tar.gz podman-0b8456b44cfe0fb82e293df227a43070677f15f7.tar.bz2 podman-0b8456b44cfe0fb82e293df227a43070677f15f7.zip |
apiv2 container limit differ from docker-api
Signed-off-by: zhangguanzhang <zhangguanzhang@qq.com>
Diffstat (limited to 'pkg')
-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:] |