aboutsummaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorzhangguanzhang <zhangguanzhang@qq.com>2020-09-23 13:21:23 +0800
committerMatthew Heon <mheon@redhat.com>2020-09-25 11:08:27 -0400
commit0b8456b44cfe0fb82e293df227a43070677f15f7 (patch)
tree6112ceb97d2d303a7dd21579677dee5e8d78ad42 /pkg
parent3be6c483c6d7ca36d16f0b312bc8c897160ab7a0 (diff)
downloadpodman-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.go2
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:]