diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-09-24 09:43:19 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-24 09:43:19 +0000 |
commit | c3d1cefa02cf631cbca87a47101b0862cdc6832b (patch) | |
tree | b2baa80aa85c649a57b31980ca66fc48fcdac71f /pkg/api | |
parent | c256944d00edbedcfbf02406600987dc8acea644 (diff) | |
parent | 873989f7a413ee8acc5e137577dfaa4d38f94fbd (diff) | |
download | podman-c3d1cefa02cf631cbca87a47101b0862cdc6832b.tar.gz podman-c3d1cefa02cf631cbca87a47101b0862cdc6832b.tar.bz2 podman-c3d1cefa02cf631cbca87a47101b0862cdc6832b.zip |
Merge pull request #7739 from zhangguanzhang/apiv2-containers-limit
apiv2 /containers/json limit differ from docker-api
Diffstat (limited to 'pkg/api')
-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:] |