Skip to content

Commit

Permalink
Merge pull request #11408 from miaoyq/fix-a-if-condition
Browse files Browse the repository at this point in the history
Merged by openshift-bot
  • Loading branch information
OpenShift Bot authored Oct 20, 2016
2 parents 44fd91b + b538101 commit 7405f17
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/image/importer/importer.go
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ func importRepositoryFromDockerV1(ctx gocontext.Context, repository *importRepos
}

// if repository import is requested (MaximumTags), attempt to load the tags, sort them, and request the first N
if count := repository.MaximumTags; count > 0 {
if count := repository.MaximumTags; count > 0 || count == -1 {
tagMap, err := conn.ImageTags(repository.Ref.Namespace, repository.Ref.Name)
if err != nil {
repository.Err = err
Expand All @@ -582,7 +582,7 @@ func importRepositoryFromDockerV1(ctx gocontext.Context, repository *importRepos
// include only the top N tags in the result, put the rest in AdditionalTags
api.PrioritizeTags(tags)
for _, s := range tags {
if count <= 0 {
if count <= 0 && repository.MaximumTags != -1 {
repository.AdditionalTags = append(repository.AdditionalTags, s)
continue
}
Expand Down

0 comments on commit 7405f17

Please sign in to comment.